Part Number Hot Search : 
SBR3504A MSJ200 10202 IZ5851V GM71V BR400 AC03F SF540
Product Description
Full Text Search
 

To Download XP06534 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 1997 motorola, inc. all rights reserved. motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "typical" parameters can and do vary in different applications. all operating parameters, including "typicals" must be validated for each customer application by customer's technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. powerpc mpc801 integrated microprocessor for embedded systems user? manual
powerquicc is a registered trademark of motorola, inc. powerpc is a registered trademark of ibm corp. and is used by motorola under license from ibm corp. i 2 c is a trademark of philips corp. all other trademarks are the property of their respective owners.
motorola mpc801 user? manual v table of contents paragraph page number title number section 1 introduction 1.1 features ...............................................................................................1-1 1.2 mpc801 architecture ...........................................................................1-4 1.2.1 the embedded powerpc core ..................................................1-5 1.2.2 the system interface unit ..........................................................1-6 1.2.3 the uart controller ..................................................................1-6 1.2.4 the i 2 c controller .......................................................................1-7 1.2.5 the serial peripheral interface controller ..................................1-7 1.3 power management .............................................................................1-7 1.4 mpc801 applications ...........................................................................1-7 1.5 differences between the mpc801 and mpc860 .................................1-8 1.6 mpc801 glueless system design .......................................................1-8 section 2 external signals 2.1 the system bus signals ......................................................................2-2 section 3 memory map section 4 reset 4.1 types of reset .....................................................................................4-1 4.1.1 power-on reset .........................................................................4-2 4.1.2 external hard reset ...................................................................4-2 4.1.3 internal hard reset ....................................................................4-3 4.1.3.1 loss of lock ....................................................................4-3 4.1.3.2 software watchdog reset ..............................................4-3 4.1.3.3 checkstop reset ............................................................4-3 4.1.3.4 debug port hard reset ..................................................4-3 4.1.3.5 jtag reset ....................................................................4-3 4.1.4 external soft reset ....................................................................4-3 4.1.5 internal soft reset ......................................................................4-4 4.1.5.1 debug port soft reset ....................................................4-4
table of contents (continued) paragraph page number title number vi mpc801 user? manual motorola 4.2 reset status register .......................................................................... 4-4 4.3 how to configure reset ....................................................................... 4-6 4.3.1 hard reset ................................................................................. 4-6 4.3.2 soft reset ................................................................................ 4-11 section 5 clocks and power control 5.1 the clock module ................................................................................ 5-3 5.2 on-chip oscillators and external clock input ...................................... 5-6 5.3 the system phase-locked loop ......................................................... 5-7 5.3.1 multiplying the frequency .......................................................... 5-7 5.3.2 eliminating skew ........................................................................ 5-7 5.3.3 operating the pll block ............................................................ 5-8 5.4 the low-power divider ........................................................................ 5-8 5.5 internal clock signals .......................................................................... 5-9 5.5.1 the general system clocks ...................................................... 5-9 5.5.2 the baud rate generator clock .............................................. 5-11 5.5.3 the synchronization clocks ..................................................... 5-11 5.6 the phase-locked loop pins ............................................................ 5-12 5.7 controlling the system clock ............................................................ 5-13 5.8 pll low-power and reset control register ..................................... 5-16 5.9 basic power structure ........................................................................ 5-22 5.10 keep alive power ............................................................................... 5-23 5.10.1 configuration ............................................................................ 5-23 5.10.2 the key mechanism ................................................................ 5-24 section 6 the powerpc core 6.1 features ............................................................................................... 6-1 6.1.1 basic structure of the core ........................................................ 6-2 6.1.2 instruction flow within the core ................................................ 6-2 6.1.3 basic instruction pipeline ........................................................... 6-4 6.2 the sequencer unit ............................................................................. 6-4 6.2.1 flow control ............................................................................... 6-4 6.2.2 issuing instructions .................................................................... 6-6 6.2.3 interrupts .................................................................................... 6-6 6.2.4 precise exception model implementation .................................. 6-8 6.2.5 processing an interrupt ............................................................ 6-11 6.2.6 serialization .............................................................................. 6-12 6.2.7 the external interrupt .............................................................. 6-13
table of contents (continued) paragraph page number title number motorola mpc801 user? manual vii 6.2.7.1 latency .........................................................................6-13 6.2.8 interrupt ordering .....................................................................6-13 6.3 the register unit ...............................................................................6-15 6.3.1 the control registers ..............................................................6-15 6.3.1.1 physical location of special registers .........................6-19 6.3.1.2 bit assignment of the control registers .......................6-20 6.3.1.3 initializing the control registers ...................................6-24 6.4 the fixed-point unit ...........................................................................6-24 6.4.1 updating xer with divide instructions .....................................6-24 6.5 the load/store unit ...........................................................................6-25 6.5.1 load/store instruction ..............................................................6-26 6.5.2 synchronizing load/store instructions .....................................6-27 6.5.3 instructions issued to the data cache .....................................6-27 6.5.4 issuing store instruction ...........................................................6-27 6.5.5 nonspeculative load instructions ............................................6-28 6.5.6 executing unaligned instructions .............................................6-28 6.5.7 little-endian mode support ......................................................6-29 6.5.8 atomic update primitives .........................................................6-29 6.5.9 instruction timing .....................................................................6-29 6.5.10 stalling storage control instructions ........................................6-30 6.5.11 accessing off-core special registers .....................................6-30 6.5.12 storage control instructions .....................................................6-30 6.5.13 exception processing ...............................................................6-31 6.5.13.1 using dar, dsisr, and bar .......................................6-31 section 7 powerpc architecture compliance 7.1 powerpc user instruction set architecture (book i) ............................7-1 7.1.1 computation modes ...................................................................7-1 7.1.2 reserved fields .........................................................................7-1 7.1.3 classes of instructions ...............................................................7-1 7.1.4 exceptions ..................................................................................7-2 7.1.5 the branch processor ................................................................7-2 7.1.6 fetching instructions ..................................................................7-2 7.1.7 branch instructions .....................................................................7-2 7.1.7.1 invalid branch instruction forms ....................................7-2 7.1.7.2 branch prediction ...........................................................7-2 7.1.8 the fixed-point processor .........................................................7-2 7.1.8.1 move to/from system register instructions ..................7-3 7.1.8.2 fixed-point arithmetic instructions .................................7-3 7.1.9 the load/store processor .........................................................7-3
table of contents (continued) paragraph page number title number viii mpc801 user? manual motorola 7.1.9.1 fixed-point load and store with update instructions .... 7-3 7.1.9.2 fixed-point load and store multiple instructions ........... 7-3 7.1.9.3 fixed-point load string instructions ............................... 7-3 7.1.9.4 storage synchronization instructions ............................. 7-3 7.1.9.5 optional instructions ....................................................... 7-3 7.1.9.6 little-endian byte ordering ............................................ 7-4 7.2 powerpc virtual environment architecture (book ii) ........................... 7-4 7.2.1 storage model ............................................................................ 7-4 7.2.1.1 memory coherence ........................................................ 7-4 7.2.1.2 atomic update primitives ............................................... 7-4 7.2.2 the effect of operand placement on performance ................... 7-4 7.2.3 the storage control instructions ............................................... 7-5 7.2.3.1 instruction cache block invalidate (icbi) ......................... 7-5 7.2.3.2 instruction synchronize (isync) ....................................... 7-5 7.2.3.3 data cache block touch (dcbt) ...................................... 7-5 7.2.3.4 data cache block touch for store (dcbtst) .................... 7-5 7.2.3.5 data cache block set to zero (dcbz) ............................. 7-5 7.2.3.6 data cache block store (dcbst) ..................................... 7-5 7.2.3.7 data cache block invalidate (dcbi) ................................ 7-5 7.2.3.8 data cache block flush (dcbf) ....................................... 7-5 7.2.3.9 enforce in-order execution of i/o (eieio) ....................... 7-6 7.2.4 timebase ................................................................................... 7-6 7.3 powerpc operating environment architecture (book iii) .................... 7-6 7.3.1 the branch processor ............................................................... 7-6 7.3.1.1 branch processor registers ........................................... 7-6 7.3.1.2 branch processor instructions ........................................ 7-6 7.3.2 the fixed-point processor ......................................................... 7-6 7.3.2.1 special-purpose registers ............................................. 7-6 7.3.3 storage model ............................................................................ 7-7 7.3.3.1 address translation ........................................................ 7-7 7.3.4 reference and change bits ....................................................... 7-7 7.3.5 storage protection ..................................................................... 7-7 7.3.6 storage control instructions ....................................................... 7-7 7.3.6.1 data cache block invalidate (dcbi) ................................ 7-7 7.3.6.2 tlb invalidate entry (tlbie) ............................................. 7-7 7.3.6.3 tlb invalidate all (tlbia) .................................................. 7-8 7.3.6.4 tlb synchronize (tlbsync) .............................................. 7-8
table of contents (continued) paragraph page number title number motorola mpc801 user? manual ix 7.3.7 interrupts ....................................................................................7-8 7.3.7.1 classes ...........................................................................7-8 7.3.7.2 processing ......................................................................7-8 7.3.7.3 definitions .......................................................................7-8 7.3.7.4 partially executed instructions ......................................7-17 7.3.8 timer facilities .........................................................................7-17 7.3.9 optional facilities and instructions ...........................................7-17 section 8 instruction execution timing 8.1 instruction execution timing examples ...............................................8-4 8.1.1 data cache load .......................................................................8-4 8.1.2 writeback ...................................................................................8-5 8.1.2.1 writeback arbitration ......................................................8-5 8.1.2.2 private writeback bus dedicated for load .....................8-6 8.1.3 fastest external load (data cache miss) ..................................8-7 8.1.4 a full history buffer ...................................................................8-8 8.1.5 branch folding ...........................................................................8-9 8.1.6 branch prediction .....................................................................8-10 section 9 instruction cache 9.1 features ...............................................................................................9-1 9.2 programming the instruction cache .....................................................9-4 9.2.1 instruction cache control and status register ..........................9-4 9.2.2 instruction cache address register ...........................................9-5 9.2.3 instruction cache data port register .........................................9-6 9.3 how the instruction cache works ........................................................9-6 9.3.1 instruction cache hit ..................................................................9-6 9.3.2 instruction cache miss ...............................................................9-6 9.3.3 instruction fetch on a predicted path .......................................9-7 9.4 instruction cache commands ..............................................................9-7 9.4.1 instruction cache block invalidate .............................................9-8 9.4.2 invalidate all instruction cache ..................................................9-8 9.4.3 load & lock ...............................................................................9-8 9.4.4 unlock line .................................................................................9-9 9.4.5 unlock all ...................................................................................9-9 9.4.6 instruction cache inhibit .............................................................9-9 9.4.7 instruction cache read ............................................................9-10 9.4.8 instruction cache write ............................................................9-11
table of contents (continued) paragraph page number title number x mpc801 user? manual motorola 9.5 restrictions ........................................................................................ 9-11 9.6 instruction cache coherency ............................................................. 9-11 9.7 updating code and memory region attributes ................................. 9-11 9.8 reset sequence ................................................................................. 9-12 9.9 debug support ................................................................................... 9-12 9.9.1 fetching instructions from the development port ................... 9-12 section 10 data cache 10.1 features ............................................................................................. 10-1 10.2 organization of the data cache ......................................................... 10-2 10.3 programming the data cache ............................................................ 10-3 10.3.1 powerpc architecture instructions .......................................... 10-3 10.3.1.1 powerpc user instruction set architecture .................. 10-3 10.3.1.2 powerpc virtual environment architecture .................. 10-3 10.3.1.3 powerpc operating environment architecture ............ 10-3 10.3.2 implementation specific operations ........................................ 10-3 10.3.3 special registers of the data cache ....................................... 10-3 10.3.3.1 data cache control and status register ..................... 10-4 10.3.3.2 data cache address register ...................................... 10-6 10.3.3.3 reading the cache structures ..................................... 10-6 10.3.3.4 data cache data register ............................................ 10-7 10.4 operating the data cache ................................................................. 10-7 10.4.1 data cache read ..................................................................... 10-7 10.4.2 data cache write ..................................................................... 10-8 10.4.2.1 copyback mode ............................................................ 10-8 10.4.2.2 writethrough mode ....................................................... 10-9 10.4.3 data cache-inhibited accesses ............................................... 10-9 10.4.4 data cache freeze .................................................................. 10-9 10.4.5 data cache coherency .......................................................... 10-10 10.5 controlling the data cache .............................................................. 10-10 10.5.1 flushing and invalidating ....................................................... 10-10 10.5.2 disabling ................................................................................ 10-10 10.5.3 locking ................................................................................... 10-10 10.5.4 storage control instructions in the data cache ..................... 10-11 10.5.4.1 dcbi, dcbst, dcbf and dcbz instructions ...................... 10-11 10.5.4.2 touch .......................................................................... 10-11 10.5.4.3 storage synchronization and reservation ................. 10-11 10.5.5 reading the data cache structures ...................................... 10-11
table of contents (continued) paragraph page number title number motorola mpc801 user? manual xi section 11 memory management unit 11.1 features .............................................................................................11-1 11.2 address translation ...........................................................................11-2 11.2.1 translation lookaside buffer operation ...................................11-2 11.3 protection ...........................................................................................11-3 11.4 storage attributes ...............................................................................11-4 11.4.1 reference and change bit updates .........................................11-4 11.4.2 storage control ........................................................................11-4 11.5 translation table structure ................................................................11-4 11.5.1 level one descriptor ................................................................11-8 11.5.2 level two descriptor ................................................................11-9 11.6 memory management unit programming model ..............................11-10 11.6.1 configuration registers ..........................................................11-10 11.6.1.1 instruction mmu control register ...............................11-10 11.6.1.2 mi_ap register ...........................................................11-11 11.6.1.3 data mmu control register ........................................11-12 11.6.1.4 md_ap register .........................................................11-13 11.6.1.5 casid register ..........................................................11-14 11.6.2 tablewalk registers ...............................................................11-14 11.6.2.1 m_twb register ........................................................11-14 11.6.2.2 m_tw register ...........................................................11-15 11.6.2.3 mi_epn register ........................................................11-15 11.6.2.4 mi_twc register .......................................................11-16 11.6.2.5 mi_rpn register ........................................................11-17 11.6.2.6 md_epn register ......................................................11-18 11.6.2.7 data mmu tablewalk control register ......................11-19 11.6.2.8 md_rpn register ......................................................11-20 11.6.3 instruction debug registers ...................................................11-22 11.6.3.1 mi_dcam register .....................................................11-22 11.6.3.2 mi_dram0 register ...................................................11-23 11.6.3.3 mi_dram1 register ...................................................11-24 11.6.4 data debug registers ............................................................11-25 11.6.4.1 md_dcam register ...................................................11-25 11.6.4.2 md_dram0 register .................................................11-26 11.6.4.3 md_dram1 register .................................................11-27 11.7 interrupts ..........................................................................................11-29 11.7.1 implementation specific instruction tlb miss ........................11-29 11.7.2 implementation specific data tlb miss .................................11-29 11.7.3 implementation specific instruction tlb error .......................11-29 11.7.4 implementation specific data tlb error ................................11-29
table of contents (continued) paragraph page number title number xii mpc801 user? manual motorola 11.8 manipulating the tlb ....................................................................... 11-30 11.8.1 reloading the tlb ................................................................. 11-30 11.8.1.1 translation reload examples ..................................... 11-31 11.8.2 controlling the tlb replacement counter ............................ 11-32 11.8.3 invalidating the tlb ............................................................... 11-32 11.8.4 loading the reserved tlb entries ........................................ 11-32 11.9 requirements for accessing the memory management unit control registers ...................................................................... 11-32 section 12 system interface unit 12.1 features ............................................................................................. 12-2 12.2 system configuration and protection ................................................. 12-2 12.3 configuring the system ...................................................................... 12-4 12.3.1 configuring the interrupt .......................................................... 12-4 12.3.2 priority of the interrupt sources ............................................... 12-5 12.3.2.1 programming the interrupt controller ........................... 12-6 12.3.2.2 siu interrupt mask register ......................................... 12-7 12.3.2.3 siu interrupt edge level mask register ...................... 12-8 12.3.2.4 siu interrupt vector register ....................................... 12-9 12.4 the bus monitor ............................................................................... 12-10 12.5 the powerpc decrementer ............................................................. 12-10 12.6 the powerpc timebase .................................................................. 12-11 12.7 the real-time clock ....................................................................... 12-11 12.8 the periodic interrupt timer ............................................................ 12-12 12.9 the software watchdog timer ........................................................ 12-13 12.10 freeze operation ............................................................................. 12-15 12.10.1 low-power stop operation .................................................... 12-15 12.11 multiplexing the system interface unit pins ..................................... 12-16 12.12 programming the system interface unit .......................................... 12-17 12.12.1 system configuration and protection registers .................... 12-17 12.12.1.1 siu module configuration register ............................ 12-17 12.12.1.2 internal memory map register ................................... 12-20 12.12.1.3 system protection control register ........................... 12-21 12.12.1.4 software service register .......................................... 12-22 12.12.1.5 transfer error status register .................................... 12-22 12.12.2 system timer registers ......................................................... 12-23 12.12.2.1 decrementer register ................................................ 12-23 12.12.2.2 timebase register ..................................................... 12-24 12.12.2.3 timebase reference register .................................... 12-24 12.12.2.4 timebase control and status register ....................... 12-25
table of contents (continued) paragraph page number title number motorola mpc801 user? manual xiii 12.12.2.5 real-time clock status and control register ............12-26 12.12.2.6 real-time clock register ...........................................12-27 12.12.2.7 real-time clock alarm register ................................12-27 12.12.2.8 periodic interupt status and control register ............12-27 12.12.2.9 periodic interrupt timer count register .....................12-28 12.12.2.10 periodic interrupt timer register ................................12-29 section 13 external bus interface 13.1 features .............................................................................................13-1 13.2 transfer signals .................................................................................13-2 13.2.1 control signals .........................................................................13-3 13.3 signal descriptions .............................................................................13-4 13.4 operations on the bus ........................................................................13-8 13.4.1 basic transfer protocol ............................................................13-8 13.4.2 single beat transfers ...............................................................13-8 13.4.2.1 single beat read flow .................................................13-9 13.4.2.2 single beat write flow ...............................................13-12 13.4.3 burst transfers .......................................................................13-16 13.4.4 the burst mechanism ............................................................13-16 13.4.5 transfer alignment and packaging ........................................13-25 13.4.6 arbitration phase signals .......................................................13-27 13.4.6.1 bus request ...............................................................13-28 13.4.6.2 bus grant ....................................................................13-28 13.4.6.3 bus busy .....................................................................13-29 13.4.7 address transfer phase-related signals ..............................13-32 13.4.7.1 transfer start ..............................................................13-32 13.4.7.2 address bus ...............................................................13-32 13.4.7.3 transfer attributes ......................................................13-32 13.4.8 termination signals ................................................................13-35 13.4.8.1 transfer acknowledge ................................................13-35 13.4.8.2 burst inhibit .................................................................13-35 13.4.8.3 transfer error acknowledge .......................................13-35 13.4.8.4 protocol for termination signals .................................13-35 13.4.9 storage reservation protocol ................................................13-37 13.4.10 exception control cycles .......................................................13-40 13.4.10.1 retry ........................................................................13-40
table of contents (continued) paragraph page number title number xiv mpc801 user? manual motorola section 14 endian modes 14.1 little-endian system features ........................................................... 14-2 14.2 big-endian system features ............................................................. 14-4 14.3 powerpc little-endian system features ........................................... 14-4 14.4 setting the endian mode of operation .............................................. 14-5 section 15 memory controller 15.1 features ............................................................................................. 15-1 15.2 basic architecture .............................................................................. 15-3 15.2.1 registers associated with the memory controller ................... 15-6 15.2.1.1 8-, 16-, and 32-bit port size configuration ................... 15-7 15.2.1.2 write-protect configuration .......................................... 15-7 15.2.1.3 address and address space checking ........................ 15-7 15.2.1.4 parity generation and checking ................................... 15-7 15.2.1.5 transfer error acknowledge generation ...................... 15-7 15.2.2 the general-purpose chip-select machine ............................ 15-7 15.2.2.1 programmable wait state configuration ..................... 15-13 15.2.2.2 extended hold time on read accesses .................... 15-13 15.2.2.3 global chip-select operation ..................................... 15-15 15.2.2.4 sram interface .......................................................... 15-16 15.2.2.5 gpcm external asynchronous master support ......... 15-17 15.2.3 user-programmable machines .............................................. 15-19 15.2.3.1 ram word structure and timing specification .......... 15-25 15.2.3.2 cs signals .................................................................. 15-28 15.2.3.3 byte select signals ..................................................... 15-29 15.2.3.4 general-purpose signals ........................................... 15-30 15.2.3.5 loop control signal .................................................... 15-31 15.2.3.6 exception handling ..................................................... 15-31 15.2.3.7 address control signals ............................................. 15-32 15.2.3.8 the disable timer mechanism ................................... 15-35 15.2.3.9 transfer acknowledge and data sample control ...... 15-36 15.2.3.10 the wait mechanism ................................................ 15-36 15.2.3.11 location of upm start addresses .............................. 15-39 15.2.3.12 example dram interface ........................................... 15-39 15.2.3.13 extended data-out interface example ....................... 15-52 15.3 external master support .................................................................. 15-59 15.4 programming the memory controller ............................................... 15-68 15.4.1 memory status register ......................................................... 15-68 15.4.2 memory periodic timer prescaler register ........................... 15-69
table of contents (continued) paragraph page number title number motorola mpc801 user? manual xv 15.4.3 base register .........................................................................15-70 15.4.4 option register ......................................................................15-72 15.4.5 machine a mode register ......................................................15-75 15.4.6 machine b mode register ......................................................15-78 15.4.7 memory command register ..................................................15-82 15.4.8 memory data register ...........................................................15-84 15.4.9 memory address register ......................................................15-84 section 16 serial communication modules 16.1 the uart controllers ........................................................................16-1 16.2 features .............................................................................................16-2 16.3 serial interface signals ......................................................................16-2 16.3.1 sub-block description ..............................................................16-3 16.3.1.1 the transmitter ............................................................16-3 16.3.1.2 the receiver ................................................................16-5 16.3.1.3 the baud rate generator ............................................16-8 16.3.1.4 the global controller interface .....................................16-8 16.4 the serial controller ........................................................................16-15 16.4.1 programming the serial controller .........................................16-15 16.4.1.1 serial controller command register ..........................16-15 16.4.2 the serial peripheral interface ...............................................16-15 16.4.2.1 features ......................................................................16-16 16.4.2.2 clocking and pin functions ........................................16-17 16.4.2.3 spi transmission and reception process .................16-18 16.4.2.4 programming the serial peripheral interface ..............16-20 16.4.3 the i 2 c controller ...................................................................16-26 16.4.3.1 features ......................................................................16-27 16.4.3.2 clocking and pin functions ........................................16-28 16.4.3.3 i 2 c controller transmission and reception process...16-28 16.4.3.4 programming the i 2 c controller ..................................16-30 16.5 the parallel i/o port .........................................................................16-35 16.5.1 features .................................................................................16-35 16.5.2 port b pin functions ...............................................................16-35 16.5.3 the port b registers ..............................................................16-37 16.5.3.1 port b open-drain register ........................................16-37 16.5.3.2 port b data register ...................................................16-37 16.5.3.3 port b data direction register ....................................16-38 16.5.3.4 port b pin assignment register .................................16-38
table of contents (continued) paragraph page number title number xvi mpc801 user? manual motorola section 17 data alignment section 18 development support 18.1 program flow tracking ...................................................................... 18-1 18.1.1 basic operation ........................................................................ 18-2 18.1.1.1 the internal hardware .................................................. 18-2 18.1.1.2 special case of queue flush information .................... 18-4 18.1.1.3 program trace in debug mode .................................... 18-5 18.1.1.4 sequential instructions marked as indirect branch ...... 18-5 18.1.1.5 the external hardware ................................................. 18-5 18.1.1.6 benefits of compression .............................................. 18-7 18.1.2 controlling the instruction fetch show cycle .......................... 18-8 18.2 watchpoint and breakpoint generation ............................................. 18-8 18.2.1 internal watchpoints and breakpoints ..................................... 18-9 18.2.1.1 features ..................................................................... 18-11 18.2.1.2 restrictions ................................................................. 18-12 18.2.1.3 byte and half-word working modes .......................... 18-12 18.2.1.4 context dependent filter ............................................ 18-14 18.2.1.5 ignore first match option ........................................... 18-14 18.2.1.6 generating compare types ....................................... 18-15 18.2.2 basic watchpoint/breakpoint operation ................................ 18-16 18.2.2.1 instruction support ..................................................... 18-16 18.2.2.2 load/store support .................................................... 18-17 18.2.2.3 counter support ......................................................... 18-18 18.2.2.4 trap enable programming ......................................... 18-20 18.3 development system interface ........................................................ 18-20 18.3.1 trap enable mode .................................................................. 18-22 18.3.2 debug mode ........................................................................... 18-22 18.3.2.1 debug mode enable vs. debug mode disable ........... 18-24 18.3.2.2 entering debug mode ................................................. 18-24 18.3.2.3 checkstop state and debug mode ............................ 18-27 18.3.2.4 saving the machine state in debug mode ................. 18-27 18.3.2.5 running in debug mode ............................................. 18-28 18.3.2.6 exiting debug mode ................................................... 18-28 18.3.3 the development port ........................................................... 18-28 18.3.3.1 the development port pins ........................................ 18-29 18.3.3.2 development port registers ....................................... 18-30 18.3.3.3 development port serial communications ................. 18-31
table of contents (continued) paragraph page number title number motorola mpc801 user? manual xvii 18.4 the software monitor debugger ......................................................18-40 18.4.1 freeze indication ....................................................................18-41 18.5 programming the development support registers ..........................18-41 18.5.1 protecting the development port registers ...........................18-41 18.5.2 development port registers ..................................................18-42 18.5.2.1 comparator a? value register ................................18-42 18.5.2.2 comparator e? value register .................................18-42 18.5.2.3 comparator g? value register ................................18-42 18.5.2.4 breakpoint address register ......................................18-42 18.5.2.5 instruction support control register ...........................18-43 18.5.2.6 load/store support comparators control register ....18-46 18.5.2.7 load/store support and?r control register ..........18-48 18.5.2.8 breakpoint counter a value and control register .....18-50 18.5.2.9 breakpoint counter b value and control register .....18-51 18.5.3 debug mode registers ...........................................................18-51 18.5.3.1 interrupt cause register .............................................18-51 18.5.3.2 debug enable register ...............................................18-53 18.5.4 development port data register ............................................18-55 section 19 ieee 1149.1 test access port 19.1 the tap controller .............................................................................19-3 19.2 the boundary scan register .............................................................19-4 19.3 the instruction register ...................................................................19-17 19.3.1 the external test instruction .................................................19-18 19.3.2 the sample/preload instruction ..............................................19-18 19.3.3 the bypass instruction ...........................................................19-18 19.3.4 the clamp instruction .............................................................19-19 19.3.5 the hi-z instruction .................................................................19-19 19.4 mpc801 restrictions ........................................................................19-19 19.5 nonscan chain operation ................................................................19-19 19.6 motorola mpc801 bsdl description ...............................................19-19
table of contents (continued) paragraph page number title number xviii mpc801 user? manual motorola section 20 electrical characteristics 20.1 maximum ratings (gnd = 0v) .......................................................... 20-1 20.2 thermal characteristics ..................................................................... 20-2 20.3 power considerations ........................................................................ 20-2 20.3.1 layout practices ....................................................................... 20-3 20.4 dc electrical specifications (v cc = 3.0 ?3.6v) ................................. 20-4 20.5 mpc801 ac electrical specifications control timing ........................ 20-5 20.6 ieee 1149.1 electrical specifications .............................................. 20-26 section 21 communication electrical characteristics 21.1 pio ac electrical specifications ........................................................ 21-1 21.2 uart brg clock ac electrical specifications .................................. 21-2 21.3 uart?xternal clock ac electrical specifications .......................... 21-3 21.4 uart?nternal clock ac electrical specifications ........................... 21-3 21.5 spi master ac electrical specifications ............................................. 21-5 21.6 spi slave ac electrical specifications ............................................... 21-6 21.7 i 2 c ac electrical specifications?cl < 100khz ................................ 21-8 21.8 i 2 c ac electrical specifications?cl > 100khz ................................ 21-8 section 22 mechanical specifications 22.1 ordering information .......................................................................... 22-1 22.2 pin assignments ?pbga-top view .................................................. 22-2 22.3 package dimensions?lastic ball grid array (pbga) ....................... 22-3 section 23 terminology appendix a quick reference guide to mpc801 registers a.1 core control registers .........................................................................a-1 a.2 internally mapped registers ................................................................a-4
table of contents (continued) paragraph page number title number motorola mpc801 user? manual xix appendixb applications b.1 mpc801 basic initialization ................................................................. b-1 b.1.1 programming the upm .............................................................. b-2 b.1.2 mpc801 mmu/cache example ................................................ b-5 b.1.2.1 basic mmu and cache concept .................................... b-5 b.1.2.2 general concept ............................................................ b-5 b.1.3 memory management unit ........................................................ b-6 b.1.3.1 memory protection ....................................................... b-10 b.1.3.2 mmu example ............................................................. b-10 b.1.4 m_twb mmu tablewalk base register ..................... b-12 b.1.5 mi_ctr instruction mmu control register ............................. b-12 b.1.6 mx_ap instruction/data access protection register .............. b-13 b.1.7 md_ctr data mmu control register .................................... b-14 b.1.8 level one descriptor format register .................................... b-15 b.1.9 level two descriptor 1k resolution format register ............ b-18 b.1.10 level two descriptor 4k resolution format register ............ b-20 b.2 configuring the mpc801 memory controller .................................... b-26 b.2.1 general configuration ............................................................. b-27 b.2.2 sram configuration ................................................................ b-27 b.2.3 eprom configuration ............................................................. b-31 b.2.4 dram configuration ............................................................... b-34 b.3 porting to the powerquicc .............................................................. b-43 b.4 using the powerpc core .................................................................. b-44 b.5 bit labeling ........................................................................................ b-44 b.5.1 code portability ....................................................................... b-44 b.6 cache ................................................................................................ b-44 b.6.1 cache performance impact ..................................................... b-44 b.6.2 data coherency ...................................................................... b-45 b.6.3 debugging ............................................................................... b-45 b.7 memory management unit ................................................................ b-45 b.8 real-time operating systems .......................................................... b-45
xx mpc801 user? manual motorola list of illustrations figure page number title number 1-1. mpc801 block diagram ........................................................................1-4 1-2. mpc801 system configuration .............................................................1-8 2-1. mpc801 external signals .....................................................................2-1 4-1. reset configuration basic scheme .......................................................4-6 4-2. reset configuration sampling scheme for short poreset assertion ...............................................................................................4-7 4-3. reset configuration sampling scheme for long poreset assertion ...............................................................................................4-7 4-4. reset configuration sampling timing requirements ...........................4-8 5-1. clock unit block diagram ......................................................................5-2 5-2. mpc801 power supply .........................................................................5-3 5-3. mpc801 clocks timing diagram ..........................................................5-4 5-4. system pll block diagram ...................................................................5-7 5-5. general system clocks select ..............................................................5-9 5-6. divided system clocks timing diagram .............................................5-10 5-7. mpc801 clocks for dfnh = 1 or dfnl = 0 timing diagram ............5-11 5-8. mpc801 low-power modes flowchart ...............................................5-19 5-9. mpc801 basic power supply configuration .......................................5-22 5-10. external power supply scheme (2.0 v internal voltage) ....................5-23 5-11. key mechanism diagram ....................................................................5-24 6-1. core block diagram ..............................................................................6-3 6-2. instruction flow conceptual diagram ...................................................6-3 6-3. basic instruction pipeline timing diagram ............................................6-4 6-4. sequencer data path ............................................................................6-5 6-5. history buffer queue .............................................................................6-9 6-6. load/store unit functional block diagram .........................................6-26 6-7. number of bus cycles needed for unaligned, single register fixed-point load/store instructions ....................................................6-28 6-8. number of bus cycles needed for string instruction execution .......6-30
list of illustrations (continued) figure page number title number motorola mpc801 user? manual xxi 8-1. example of a data cache load ............................................................8-4 8-2. example of a writeback arbitration .......................................................8-5 8-3. another example of a writeback arbitration .........................................8-5 8-4. example of a private writeback bus load ............................................8-6 8-5. example of an external load ................................................................8-7 8-6. example of a full history buffer ............................................................8-8 8-7. example of branch folding ...................................................................8-9 8-8. example of branch prediction .............................................................8-10 9-1. instruction cache organization .............................................................9-2 9-2. cache data path block diagram ...........................................................9-3 10-1. data cache organization ....................................................................10-2 11-1. effective to real address translation for 4k pages ..........................11-3 11-2. two level translation table when md_ctr(twam) = 1 .................11-5 11-3. two level translation table when md_ctr(twam) = 0 .................11-6 12-1. system configuration and protection logic ........................................12-3 12-2. mpc801 interrupt structure ................................................................12-4 12-3. interrupt table handling example .......................................................12-9 12-4. rtc block diagram ...........................................................................12-12 12-5. periodic interrupt timer block diagram ............................................12-12 12-6. software watchdog timer service state diagram ............................12-14 12-7. software watchdog timer block diagram ........................................12-15 13-1. input sample window .........................................................................13-2 13-2. mpc801 bus signals ..........................................................................13-3 13-3. basic transfer protocol .......................................................................13-8 13-4. simplified diagram of a single beat read cycle ................................13-9 13-5. single beat read cycle?asic timing?ero wait states .................13-10 13-6. single beat read cycle?asic timing?ne wait state ...................13-11 13-7. simplified flow diagram of a single beat write cycle ......................13-12 13-8. single beat write cycle?asic timing?ero wait states .................13-13 13-9. single beat write cycle?asic timing?ne wait state ....................13-14 13-10. single beat?2-bit data?rite cycle?6-bit port size basic timing ................................................................................................13-15 13-11. simplified flow diagram of a burst read cycle ..............................13-17
list of illustrations (continued) figure page number title number xxii mpc801 user? manual motorola 13-12. burst-read cycle?2-bit port size?ero wait state ........................ 13-18 13-13. burst-read cycle?2-bit port size?ne wait state ......................... 13-19 13-14. burst-read cycle?2-bit port size?ait states between beats ..... 13-20 13-15. burst-read cycle?6-bit port size?ne wait state between beats ................................................................................................. 13-21 13-16. simplified flow diagram of a burst write cycle ................................ 13-22 13-17. burst write cycle?2-bit port size?ero wait states ....................... 13-23 13-18. burst-inhibit cycle?2-bit port size .................................................. 13-24 13-19. internal operand representation ...................................................... 13-25 13-20. interface to different port size devices ........................................... 13-26 13-21. bus arbitration flowchart .................................................................. 13-28 13-22. basic connection of the master signal ............................................. 13-29 13-23. bus arbitration timing diagram ........................................................ 13-30 13-24. internal bus arbitration state machine .............................................. 13-31 13-25. termination signals protocol basic connection ............................... 13-36 13-26. termination signals protocol timing diagram .................................. 13-37 13-27. reservation on a local bus ............................................................. 13-38 13-28. reservation on multilevel bus hierarchy .......................................... 13-39 13-29. retry transfer timing?nternal arbiter .............................................. 13-41 13-30. retry transfer timing?xternal arbiter ............................................. 13-42 13-31. retry on burst cycle ........................................................................ 13-43 14-1. general mpc801 system diagram ..................................................... 14-2 15-1. memory controller block diagram ...................................................... 15-2 15-2. mpc801 simple system configuration ............................................... 15-4 15-3. memory controller machine selection ................................................ 15-5 15-4. memory controller basic operation .................................................... 15-6 15-5. mpc801 gpcm?emory devices interface ....................................... 15-8 15-6. mpc801 gpcm?emory device basic timing (acs = 00,trlx = 0) .......................................................................... 15-9 15-7. mpc801 gpcm?eripheral device interface ..................................... 15-9 15-8. mpc801 gpcm?eripheral device basic timing (acs = 10, acs = 11,trlx = 0) ...................................................... 15-10 15-9. mpc801 gpcm?elaxed timing?ead access (acs = 10, acs = 11, scy = 1, trlx =1) ....................................... 15-11 15-10. mpc801 gpcm?elaxed timing?rite access (acs = 10, acs = 11, scy = 0, csnt = 0, trlx =1) ..................... 15-11 15-11. mpc801 gpcm?elaxed timing?rite access (acs = 10, acs = 11, scy = 0, csnt = 1, trlx =1) ..................... 15-12
list of illustrations (continued) figure page number title number motorola mpc801 user? manual xxiii 15-12. mpc801 gpcm?elaxed timing?rite access (acs = 00, scy = 0, csnt = 1, trlx =1 ........................................15-12 15-13. mpc801 consecutive accesses write after read?orx-ehtr = 0) ............................................................15-13 15-14. mpc801 consecutive accesses write after read?orx-ehtr = 1) ............................................................15-14 15-15. mpc801 consecutive accesses read after read from different banks?orx-ehtr = 1) .....................................................15-14 15-16. mpc801 consecutive accesses read after read from same bank?(orx-ehtr = 1) ..........................................................15-15 15-17. mpc801?imple 128k sram configuration ....................................15-16 15-18. mpc801?synchronous external master configuration for gpcm?andled memory devices ....................................................15-17 15-19. asynchronous master gpcm?emory devices basic timing (trlx = 0) ...................................................................15-18 15-20. general description of a upm ...........................................................15-19 15-21. memory periodic timer request block diagram ..............................15-20 15-22. memory controller upm clock scheme (for system_to clkout division factor 1?bdf = 00) ................15-21 15-23. memory controller upm clock scheme (for system_to clkout division factor 2?bdf = 01) ................15-21 15-24. upm signals timing example (for system_to clkout division factor 1?bdf = 00) ................15-22 15-25. upm signals timing example (for system_to clkout division factor 2?bdf = 01) ................15-23 15-26. upm external signal generation ......................................................15-24 15-27. ram word structure .........................................................................15-25 15-28. cs signal control model ...................................................................15-28 15-29. byte select control model .................................................................15-29 15-30. upm data handling in read accesses .............................................15-36 15-31. upm wait mechanism timing for internal and external synchronous masters 1........................................................................5-38 15-32. upm wait mechanism timing for an external asynchronous master ...............................................................................................15-39 15-33. mpc801?ram interface connection ..............................................15-40 15-34. address start pointers of the upm ram array .................................15-41 15-35. single beat read access to page mode dram ..............................15-43 15-36. single beat write access to page mode dram ..............................15-44 15-37. burst read access to page mode dram (no loop) .....................15-45 15-38. burst read access to page mode dram (loop) ..........................15-46
list of illustrations (continued) figure page number title number xxiv mpc801 user? manual motorola 15-39. burst write access to page mode dram (no loop) ..................... 15-47 15-40. refresh cycle (cbr) to page mode dram .................................... 15-48 15-41. exception cycle ................................................................................ 15-49 15-42. page mode dram burst read access (data sampling on falling edge of clkout) ................................... 15-51 15-43. edo interface connection ................................................................ 15-52 15-44. single beat read access to page mode dram with extended data-out ............................................................................................ 15-53 15-45. single beat write access to page mode dram with extended data-out ............................................................................................ 15-54 15-46. burst read access to page mode dram with extended data-out ............................................................................................ 15-55 15-47. burst write access to page mode dram with extended data-out ............................................................................................ 15-56 15-48. refresh cycle (cbr) to page mode dram with extended data-out ............................................................................................ 15-57 15-49. exception cycle for page mode dram with extended data-out ............................................................................................ 15-58 15-50. synchronous external master basic access (gpcm controlled) ..... 15-62 15-51. asynchronous external master basic access (gpcm controlled) ... 15-63 15-52. synchronous external master?pc801?ram device typical configuration ........................................................................ 15-64 15-53. synchronous external master?urst read access to page mode dram ...................................................................................... 15-65 15-54. asynchronous external master?pc801?ram device typical configuration ........................................................................ 15-66 15-55. asynchronous external master?ead access to page mode dram ................................................................................................ 15-67 15-56. blank worksheet for a upm .............................................................. 15-85 16-1. uart block diagram .......................................................................... 16-1 16-2. spi block diagram ............................................................................ 16-16 16-3. spi transfer format with cp = 0 ...................................................... 16-21 16-4. spi transfer format with cp = 1 ...................................................... 16-22 16-5. i 2 c controller block diagram ............................................................ 16-27
list of illustrations (continued) figure page number title number motorola mpc801 user? manual xxv 18-1. watchpoints and breakpoint support ................................................18-10 18-2. partially supported watchpoints/breakpoint example ......................18-14 18-3. instruction support general structure ...............................................18-16 18-4. load/store support general structure ..............................................18-19 18-5. relationship between the core and debug mode ............................18-21 18-6. debug mode logic implementation ...................................................18-23 18-7. debug mode reset configuration timing diagram ...........................18-25 18-8. development port/bdm connector pinout options ..........................18-30 18-9. asynchronous clocked serial communications timing diagram .....18-33 18-10. synchronous self-clocked serial communications timing diagram .............................................................................................18-34 18-11. enabling clock mode following reset timing diagram ...................18-35 18-12. example of download procedure code ............................................18-39 18-13. slow download procedure loop .......................................................18-40 18-14. fast download procedure loop ........................................................18-40 19-1. test logic block diagram ...................................................................19-2 19-2. tap controller state machine .............................................................19-3 19-3. output pin cell (o.pin) ........................................................................19-4 19-4. observe-only input pin cell (i.obs) ....................................................19-4 19-5. output control cell (io.ctl) ...............................................................19-5 19-6. general arrangement of bidirectional pin cells ..................................19-5 19-7. bypass register ................................................................................19-18 20-1. external clock timing diagram .........................................................20-10 20-2. synchronous output signals timing diagram ..................................20-11 20-3. synchronous active pull-up and open-drain outputs signals timing diagram .................................................................................20-12 20-4. synchronous input signals timing diagram .....................................20-12 20-5. input data in normal case timing diagram .....................................20-13 20-6. input data timing when controlled by the upm in the memory controller .............................................................................20-13 20-7. external bus read timing diagram (gpcm controlled?cs = ?0? .........................................................20-14 20-8. external bus read timing diagram (gpcm controlled?rlx = ??acs = ?0? .......................................20-14 20-9. external bus read timing diagram (gpcm controlled?rlx = ??acs = ?1? .......................................20-15 20-10. external bus read timing diagram (gpcm controlled?rlx = ?? acs = ?0? acs = ?1? ...................20-15
list of illustrations (continued) figure page number title number xxvi mpc801 user? manual motorola 20-11. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? ..................................... 20-16 20-12. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? ..................................... 20-16 20-13. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? ..................................... 20-17 20-14. external bus timing diagram (upm controlled signals) .................. 20-18 20-15. asynchronous upwait asserted detection in upm handled cycles timing diagram .............................................. 20-19 20-16. asynchronous upwait negated detection in upm handled cycles timing diagram .............................................. 20-19 20-17. synchronous external master access timing diagram (gpcm handled acs = ?0? ............................................................ 20-20 20-18. asynchronous external master memory access timing diagram (gpcm controlled?cs = ?0? ........................................................ 20-20 20-19. asynchronous external master timing diagram (control signals negation time) ....................................................... 20-21 20-20. interrupt detection timing diagram for external level-sensitive lines ..................................................... 20-21 20-21. interrupt detection timing diagram for external edge-sensitive lines ..................................................... 20-22 20-22. debug port clock input timing diagram ........................................... 20-22 20-23. debug port timing diagram .............................................................. 20-23 20-24. reset timing diagram (configuration from data bus) .................... 20-24 20-25. reset timing diagram?pc801 data bus weak drive during configuration ......................................................................... 20-25 20-26. reset timing diagram?ebug port configuration ............................ 20-25 20-27. jtag test clock input timing diagram ............................................ 20-26 20-28. jtag?est access port timing diagram ......................................... 20-27 20-29. jtag?rst timing diagram ........................................................... 20-27 20-30. boundary scan (jtag) timing diagram ........................................... 20-28 21-1. parallel i/o data-in/data-out timing diagram .................................... 21-1 21-2. baud rate generator from uart?iming .......................................... 21-2 21-3. uart receive .................................................................................... 21-4 21-4. uart transmit ................................................................................... 21-4 21-5. spi master (cp=0) .............................................................................. 21-5 21-6. spi master (cp=1) .............................................................................. 21-6 21-7. spi slave (cp=0) ................................................................................ 21-7 21-8. spi slave (cp=1) ................................................................................ 21-7 21-9. i 2 c bus timing .................................................................................... 21-9
list of illustrations (continued) figure page number title number motorola mpc801 user? manual xxvii b-1. general system configuration ........................................................... b-27 b-2. sram read timing analysis ............................................................. b-30 b-3. sram write timing analysis ............................................................. b-30 b-4. eprom 1 wait state read ................................................................ b-32 b-5. upm signal timings ........................................................................... b-35 b-6. upm ram configuration .................................................................... b-36 b-7. dram 3-cycle read .......................................................................... b-38 b-8. dram 3-cycle write .......................................................................... b-41 b-9. burst read access ............................................................................. b-42 b-10. write burst access ............................................................................. b-43
xxviii mpc801 user? manual motorola list of tables table page number title number 2-1. signal descriptions ................................................................................2-2 2-2. pin breakout ........................................................................................2-10 3-1. mpc801 internal memory map .............................................................3-1 4-1. possible reset results .........................................................................4-1 5-1. reset clocks source configuration ......................................................5-5 5-2. tmbclk divisions .....................................................................................5-6 5-3. xfc capacitor values .........................................................................5-13 5-4. mpc801 low-power modes ................................................................5-18 6-1. branch prediction policy .......................................................................6-6 6-2. ?efore?and ?fter?interrupts ...............................................................6-8 6-3. special ports to the machine state register bits ................................6-11 6-4. interrupt latency .................................................................................6-11 6-5. detection order of instruction-related interrupts ................................6-14 6-6. interrupt priorities mapping .................................................................6-14 6-7. standard special-purpose registers ..................................................6-15 6-8. standard timebase register mapping ................................................6-16 6-9. additional special-purpose registers .................................................6-16 6-10. other control registers .......................................................................6-18 6-11. encoding of special registers located outside the core ..................6-19 6-12. address of special registers located outside the core ....................6-19 6-13. load/store instructions timing ............................................................6-30 6-14. dar, bar, and dsisr value summary .............................................6-31 7-1. offset of first instruction by interrupt type ...........................................7-8 8-1. instruction execution timing .................................................................8-1 9-1. ic_adr bits functionality for the cache read command .................9-10 9-2. ic_dat bit layout when reading a tag ............................................9-11
list of tables (continued) table page number title number motorola mpc801 user? manual xxix 10-1. dc_adr bit functionality for reading the cache ..............................10-6 10-2. dc_dat bit layout for reading a tag ..............................................10-7 11-1. number of effective address bits replaced by real address bits .....11-7 11-2. number of identical entries required in the level one table ............11-7 11-3. number of identical entries required in the level two table ............11-7 11-4. level one (segment) descriptor format ............................................11-8 11-5. level two (page) descriptor format ..................................................11-9 12-1. priority of system interface unit interrupt sources .............................12-5 12-2. multiplexing control ...........................................................................12-16 12-3. standard timebase register mapping ..............................................12-24 13-1. mpc801 system interface unit signals ..............................................13-4 13-2. data bus requirements for read cycles ........................................13-26 13-3. data bus contents for write cycles ..................................................13-27 13-4. burst/tsize encoding ...................................................................13-33 13-5. definitions of address types .............................................................13-34 13-6. termination signal protocol ..............................................................13-36 14-1. powerpc little-endian effective address modification for individually aligned scalar ..................................................................14-1 14-2. endian mode programming for core data structures .......................14-1 14-3. little-endian program/data path between the register and 32-bit memory .....................................................................................14-3 14-4. little-endian program/data path between the register and 16-bit memory .....................................................................................14-3 14-5. little-endian program/data path between the register and 8-bit memory .......................................................................................14-4 15-1. boot bank field values after reset ..................................................15-16 15-2. upm ram word ................................................................................15-25 15-3. byte select enable function .............................................................15-30 15-4. loop field for upm service requests .............................................15-31 15-5. address multiplexing .........................................................................15-32 15-6. ama/amb definition for dram interfaces .......................................15-33 15-7. upm start address locations ...........................................................15-39 15-8. upm ram word bit field example ...................................................15-40
list of tables (continued) table page number title number xxx mpc801 user? manual motorola 15-9. upm ram word bit field example ................................................... 15-50 15-10. edo connection field value example ............................................. 15-52 15-11. gpl5 signal behavior ....................................................................... 15-60 16-1. typical baud rates of asynchronous communication ..................... 16-13 16-2. port b pin assignment ...................................................................... 16-36 18-1. vf pin encoding ................................................................................. 18-4 18-2. detecting the trace buffer starting point ............................................ 18-7 18-3. fetch show cycle control ................................................................... 18-8 18-4. instruction watchpoints programming options ................................. 18-17 18-5. load/store data events .................................................................... 18-18 18-6. load/store watchpoint programming options .................................. 18-18 18-7. checkstop state and debug mode ................................................... 18-27 18-8. trap enable data shifted into development port shift register ...... 18-36 18-9. debug port command shifted into the development port shift register ..................................................................................... 18-36 18-10. status/data shifted out of the development port shift register ..................................................................................... 18-37 18-11. debug instructions/data shifted into the development port shift register ..................................................................................... 18-38 18-12. development support register protection ........................................ 18-41 19-1. boundary scan bit definition .............................................................. 19-6 19-2. instruction decoding ......................................................................... 19-17 20-1. bus operation timing ......................................................................... 20-6 20-2. interrupt timing ................................................................................. 20-21 20-3. debug port timing ............................................................................ 20-22 20-4. reset timing ..................................................................................... 20-23 20-5. jtag timing ..................................................................................... 20-26 a-1. standard special-purpose registers ....................................................a-2 a-2. standard timebase register mapping ..................................................a-2 a-3. added special-purpose registers ........................................................a-3 a-4. other control registers ........................................................................a-4 a-5. mpc801 internal memory map .............................................................a-5
list of tables (continued) table page number title number motorola mpc801 user? manual xxxi b-1. read single beat?ssa ...................................................................... b-3 b-2. write single beat?ssa ..................................................................... b-3 b-3. read burst cycle?bsa ...................................................................... b-3 b-4. write burst cycle?bsa ..................................................................... b-3 b-5. refresh cycle?bsa ........................................................................... b-4 b-6. exception cycle?csa ........................................................................ b-4 b-7. physical memory map example ......................................................... b-11 b-8. mmu register .................................................................................... b-11 b-9. option register .................................................................................. b-28 b-10. base register ..................................................................................... b-28 b-11. upm word structure .......................................................................... b-34
motorola mpc801 user? manual 1-1 1 section 1 introduction the mpc801 powerpc quad integrated communications controller (powerquicc) is a versatile one-chip integrated microprocessor and peripheral combination that can be used in a variety of controller applications. it is a low-cost version of the mpc860 that provides an effective price/performance solution across a wide range of applications. the mpc801, like the mpc860, combines a high-performance powerpc core with a multifaceted system integration package. unless otherwise specified, the powerquicc unit will be referred to as the mpc801 in this manual. the mpc801 is a powerpc-based derivative of motorola? mc68360 quad integrated communications controller (quicc ). the cpu on the mpc801 is a 32-bit powerpc implementation that incorporates memory management units and instruction and data caches. the memory controller has been enhanced, thus enabling the mpc801 to support any type of memory, including high performance memories and newer dynamic random access memories (drams). the purpose of this manual is to describe the operation of all the mpc801 functionality with concentration on the i/o functions. additional details on the mpc801 can be found in the powerpc architectural specifications. 1.1 features the following list summarizes the main features of the mpc801: powerpc single-issue integer core performs branch folding and prediction with conditional prefetch, but without conditional execution precise exception model extensive system development support on-chip watchpoints and breakpoints program flow tracking on-chip emulation (once) development interface high performance (52k dhrystone 2.1 mips @40mhz, 3.3v, 1.3w total power) low power (3.3v operation with 5v ttl compatibility) mpc8xx powerpc system interface, including a periodic interrupt timer, a bus monitor, and real-time clocks fully static design (0-40mhz operation)
introduction 1-2 mpc801 user? manual motorola 1 four major power-saving modes full on, doze, sleep, and deep sleep gear mode 256-pin ball grid array packaging 26-bit address bus and 32-bit data bus supports multiple master designs four-beat transfer bursts, two-clock minimum bus transactions dynamic bus sizing controlled by on-chip memory controller supports data parity tolerates 5v inputs and provides 3.3v outputs flexible memory management 8-entry, fully associative instruction translation lookaside buffers (tlbs) 8-entry, fully associative data translation lookaside buffers 4k, 16k, 512k, or 8m page size support 1k protection granularity support for multiple protection groups and tasks attribute support for trapping, writethrough, cache inhibit, and memory-mapped i/o supports software tablewalk 1k physical address, two-way, set-associative data cache single-cycle access on hit 4-word line size, burst fill, least recently used (lru) replacement cache lockable on line granularity read capability of all tags and attributes provided for debugging purposes 2k physical address, two-way, set-associative instruction cache single-cycle access on hit four-word line size, burst fill, least recently used replacement cache lockable on line granularity cache control supports powerpc invalidate instruction cache inhibit supported for the entire cache or per memory management unit page in conjunction with memory management logic read capability of all tags and attributes provided for debugging purposes memory controller with eight banks glueless interface to sram, dram, eprom, flash and other peripherals byte write enables and selectable parity generation 32-bit address decodes with bit masks each bank can be a chip-select or ras to support a dram bank maximum of 30 programmable wait states per bank programmable dram controller supports most size and speed memory interfaces four cas lines, four we lines, and one oe line boot chip-select available at reset (optional 8-, 16-, or 32-bit memory) variable block sizes (32k to 256m) selectable write protection
introduction motorola mpc801 user? manual 1-3 1 system interface unit clock synthesizer power management reset controller powerpc decrementer and timebase real-time clock register periodic interrupt timer hardware bus monitor and software watchdog timer ieee 1149.1 jtag test access port low-power stop mode on-chip bus arbitration logic interrupt support eight external interrupt request lines internal interrupt sources uart support two uarts standard baud rates of 300bps to 115.2kbps with 16 sample clock ? external 1 clock for high-speed synchronous communication ? flexible 5-wire serial interface ? direct support of irda physical layer protocol ? 8-byte fifos for transmit and receive ? programmable data format: ? programmable channel modes (normal and local loopback) ? parity, framing, and overrun error detection ? generation and detection of break ? robust receiver data sampling with noise filtering ? eight maskable interrupts ? low-power idle mode i 2 c support ? two-wire interface (sda and scl) ? full-duplex operation ? master or slave i 2 c mode support ? multimaster environment support ? clock rate support at a maximum of 520khz, assuming a 25mhz system clock ? local loopback capability for testing serial peripheral interface support ? four-wire interface (spimosi, spimiso, spiclk, and spisel ) ? full-duplex operation ? 8- and 16-bit data character operation ? back-to-back character transmission and reception support ? master or slave serial peripheral interface mode support ? multimaster environment support
introduction 1-4 mpc801 user? manual motorola 1 clock rates support at a maximum of 6.25mhz in master mode and 12.5mhz in slave mode (assuming a 25mhz system clock) independent programmable baud rate generator programmable clock phase and polarity open-drain output pins support multimaster configuration local loopback capability for testing debug interface support eight comparators supports =, 1 , <, and > conditions each watchpoint can generate a breakpoint internally 1.2 mpc801 architecture the mpc801 is a combination of the embedded powerpc core and integrated peripherals brought together to meet the demands of various communications and networking products. the mpc801 is comprised of six modules that all use the 32-bit internal bus: an embedded powerpc core a system interface unit two uarts an i 2 c controller a serial peripheral interface the mpc801 block diagram is illustrated in figure 1-1. figure 1-1. mpc801 block diagram embedded powerpc core load/store bus instruction bus i-cache i-mmu d-cache d-mmu system interface unit biu uart i 2 c spi pio uart memory controller system functions
introduction motorola mpc801 user? manual 1-5 1 1.2.1 the embedded powerpc core the embedded powerpc core complies with the specifications discussed in the powerpc family: the programming environment (mpcfpe/d) manual that is available from motorola. the core has a fully static design that consists of two functional blocks?he integer block and load/store block. it executes all integer and load/store operations directly on the hardware. the core supports integer operations on a 32-bit internal data path with 32-bit arithmetic hardware. the interface to the internal and external buses is 32 bits. the core uses a 2-instruction load/store queue, a 4-instruction prefetch queue, and a 6-instruction history buffer. it does branch folding and prediction with conditional prefetch, but does not support conditional execution. the core can operate on 32-bit external operands with one bus cycle. the powerpc integer block supports 32 32-bit fixed-point general-purpose registers and it can execute one integer instruction per clock cycle. the embedded powerpc core is integrated with the memory management unit as well with the instruction and data caches. each memory management unit (mmu) provides an 8-entry, fully associative instruction and data tlb, with 4k, 16k, 512k, and 8m page sizes. it supports 16 virtual address spaces with 16 protection groups. three special registers are available as scratch registers to support software tablewalk and update. the instruction cache is 2k, two way, set associative with physical addressing. it allows single-cycle access on hit with no added latency for miss. it has four words per line supporting burst line fill using least recently used replacement. the cache can be locked on a per line basis for application critical routines. the cache inhibit mode can be programmed on a per mmu page basis. the data cache is 1k, two way, set associative with physical addressing. it allows single-cycle access on hit with one added clock latency for miss. it has four words per line, supporting burst line fill using lru replacement. the cache can be locked on a per line basis for application critical data. the data cache can be programmed to support copyback or writethrough via the memory management unit. the cache inhibit mode can be programmed on a per mmu page basis. the powerpc core, together with its instruction and data caches, delivers approximately 52 mips at 40mhz using dhrystone 2.1. the core contains a debug interface that provides superior debug capabilities without causing any degradation in the speed of operation. this interface supports six watchpoint pins that are used to detect software events. internally, it has eight comparators, four of which operate on the effective address of the address bus. the remaining four comparators are split?wo comparators operate on the effective address of the data address bus and two operate on the data bus. the core can compare using the =, 1 , <, and > conditions to generate watchpoints. then each watchpoint can generate a breakpoint that can be programmed to trigger after a certain number of events.
introduction 1-6 mpc801 user? manual motorola 1 1.2.2 the system interface unit the system interface unit (siu) on the mpc801 integrates general-purpose features useful in almost any 32-bit processor system, thus enhancing the performance provided by the system integration module on the mc68360 quicc device. multiple bus port sizes are supported and bus sizing allows 8-, 16-, and 32-bit peripherals and memory to exist in the 32-bit system bus mode. data parity is supported using 4-bit data parity and the parity type can be odd or even. the system interface unit also contains power management functions, reset control, decrementer, timebase, and real-time clock. the memory controller manages memories with a nonmultiplexed address bus using the sram interface. using the dram interface, the memory controller also manages memories with a multiplexed address bus (dram, srdram, and edo). both submodules support glueless interface to 8-, 16-, and 32-bit wide memories. the memory controller supports up to eight memory banks and can use address type matching to qualify the memory bank accesses. each bank can use either the sram or dram interface. the memory controller provides four byte enable signals, one output enable signal, and one boot chip-select available at reset. the sram interface provides block sizes that vary between 32k to 64m. each bank of memory has 0 to 30 wait states (zero wait state means a two-clock access to external sram). the dram interface supports 256k, 512k, 1m, 2m, 4m, 8m, 16m, 32m, or 64m memory bank depths for all port sizes. the memory depth can be defined as 64k and 128k for 8-bit memory or 128m and 256m for 32-bit memory. the dram controller supports page mode access for successive transfers within bursts. the mpc801 supports a glueless interface to one bank of dram, but external buffers are required for additional memory banks. the refresh unit provides cas before ras , a programmable refresh timer, disable refresh mode, and stacking for seven refresh cycles. the dram interface uses a programmable state machine to support most memory interfaces. 1.2.3 the uart controller each communication channel has a full-duplex universal asynchronous receiver/transmitter (uart). the operating frequency for each receiver and transmitter can be selected independently from the baud rate generator, counter/timer, or external clock. the transmitter accepts parallel data from the core, converts it to a serial bitstream, inserts the appropriate start, stop, or optional parity bits, and then outputs a composite serial stream of data on the txd output pin. the receiver accepts the serial data on the rxd pin, converts it to parallel format, checks for a start bit, stop bit, parity bit (if any), or break condition, and transfers an assembled character to the core during read operations.
introduction motorola mpc801 user? manual 1-7 1 1.2.4 the i2c controller the i 2 c controller is a synchronous, multimaster bus that is used to connect several integrated circuits on a board. it uses two wires to carry information between the integrated circuits that are connected to the bus. the i 2 c controller consists of transmitter and receiver sections, an independent baud rate generator, and a control unit. the transmitter and receiver sections use the same clock that is derived from the i 2 c controller baud rate generator in master mode and generated externally in slave mode. 1.2.5 the serial peripheral interface controller the serial peripheral interface (spi) is a full-duplex, synchronous, character-oriented channel that supports a four-wire interface (receive, transmit, clock and slave select). the serial peripheral interface block consists of transmitter and receiver sections, an independent baud rate generator, and a control unit. the transmitter and receiver sections use the same clock that is derived from the spi baud rate generator in master mode and generated externally in slave mode. during an serial peripheral interface transfer, data is simultaneously transmitted and received. 1.3 power management the mpc801 supports a wide range of power management features, including full-on, doze, sleep, deep sleep, and low-power stop. in full-on mode, the mpc801 processor is fully powered with all internal units operating at full speed. a gear mode is provided that allows the operating system to reduce the operational frequency of the processor. doze mode disables core functional units, except for the timebase, decrementer, phase locked loop, memory controller, and real-time clock. sleep mode disables everything, except the real- time clock and periodic interrupt timer, thus leaving the phase locked loop active for quick wake-up. the deep sleep mode disables the phase locked loop for low-power, but at the expense of a slower wake-up. low-power stop disables all logic in the processor (except the minimum logic required to restart the device) and lowers the power consumption, but it also requires the longest wake-up time. 1.4 mpc801 applications the mpc801 device is specifically designed to be a general-purpose, low-cost entry point to the embedded powerpc family at motorola. the device excels in applications that require the performance of a single-issue powerpc core with moderate amounts of data and instruction cache. it can support alternate bus masters in addition to providing all the basic features of glueless memory connections, but does not provide much in the way of serial connectivity. instead, it supplies simple uart serial channels as well as i 2 c and serial peripheral interface channels for onboard communication to other peripheral chips. the mpc801 excels in low-power and portable applications because of its expansive power-down modes. in addition, the normal operation current is low. the mpc801 is ideal for applications where a significant portion of your added value is in peripherals or asics and a low-cost general-purpose core is required. the programmable flexibility of the memory controller ensures that the board design can accommodate future memory types without hardware changes, thus enabling the asic to concentrate on other system goals.
introduction 1-8 mpc801 user? manual motorola 1 1.5 differences between the mpc801 and mpc860 the mpc801 can be considered a subset of the standard mpc860 device. the following modifications were made to the mpc860 to create the mpc801: the 4k instruction cache was reduced to 2k the 4k data cache was reduced to 1k the 32-bit instruction and data memory management units were reduced to eight tlb entries each the 32-bit address bus was reduced to 26 bits pcmcia support was eliminated all existing serial interface logic and their respective dmas was replaced with two uarts, one i 2 c, and a serial peripheral interface (all non-dma based). the uarts are modeled after the mc68328 dragonball device. 1.6 mpc801 glueless system design a fundamental design goal of the mpc801 was to have a flexible interface to other system components. figure 1-2 illustrates a system configuration that offers one flash eprom and supports dram simm and one sram. depending on the capacitance on the system bus, external buffers may be required. from a logic standpoint, however, a glueless system is maintained. figure 1-2. mpc801 system configuration mpc801 address cs0 gpl1/oe we(0:3) data cs1 rd/wr parity(0:3) cs2 ras cas(0:3) w dram sram 8-bit boot eprom/flash address address ce oe we data parity(0:3) data address ce oe we data we(0)
motorola mpc801 user? manual 2-1 2 section 2 external signals this section contains brief descriptions of the mpc801 input and output signals in their functional groups as illustrated in figure 2-1. figure 2-1. mpc801 external signals mpc801 26 1 8 32 4 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 vddsyn/vsssyn/vsssyn1/vddh/vddl/vss/kapwr spisel/pb[31] spiclk/pb[30] spimosi/pb[29] spimiso/pb[28] i2csda/pb[27] i2cscl/pb[26] ugpio1/pb[25] ugpio2/pb[24] ucts1/pb[23] ucts2/pb[22] urxd1/pb[21] urxd2/pb[20] urts1/pb[19] urts2/pb[18] utxd1/pb[17] utxd2/pb[16] tms dsdi/tdi dsck/tck trst dsdo/tdo as a[6:31] tsiz0 tsiz1 rd/wr burst bdip/gplb5 ts ta tea bi rsv/irq2 kr/retry/irq4 cr/irq3 d[0:31] dp[0:3]/irq[3:6] br bg bb frz/irq6 irq[0:1] irq[7] cs[0:7] we0/bs_ab0 we1/bs_ab1 we2/bs_ab2 we3/bs_ab3 gpla0/gplb0 oe/gpla1/gplb1 gpla[2:3]/gplb[2:3]/cs[2:3] upwaita/gpla4 upwaitb/gplb4 gpla5 poreset rstconf hreset sreset xfc clkout extclk texp dsck/at1 iwp(0:1)/vfls[0:1] at2 iwp2/vf2 lwp0/vf0 lwp1/vf1 dsdi/irq5 ptr/at3 modck1/sts modck2/dsdo baddr[28:30] xtal extal
external signals 2-2 mpc801 user? manual motorola 2 2.1 the system bus signals the mpc801 system bus signals consist of all the lines that interface with the external bus. many of these lines perform different functions, depending on how you assign them. the following input and output signals are identified by their mnemonic name and each signal? pin number can be found in figure 2-1. table 2-1. signal descriptions pin name pin number description a[6-31] see table 2-2 for pin breakout. address bus this bidirectional three-state bus provides the address for the current bus cycle. a0 is the most-significant signal for this bus. the bus is output when an internal master on the mpc801 initiates a transaction on the external bus. the mpc801 is connected to the 26 least-significant bits on the bus. the bus is input when an external master initiates a transaction on the bus and it is sampled internally so the memory controller can control the accessed slave device. tsiz0 c10 transfer size 0 ?hen accessing a slave in the external bus, this three-state signal is used (together with tsiz1) by the bus master to indicate the number of operand bytes waiting to be transferred in the current bus cycle. this signal is input when an external master initiates a transaction on the bus and it is sampled internally so the memory controller can control the accessed slave device. tsiz1 b10 transfer size 1 this three-state signal is used by the bus master to indicate the number of operand bytes waiting to be transferred in the current bus cycle. this signal is driven by the mpc801 when it is the owner of the bus. it is input when an external master initiates a transaction on the bus and it is sampled internally so the memory controller can control the accessed slave device. rd/wr c4 read write ?his three-state signal is driven by the bus master to indicate the direction of the bus? data transfer. a logic one indicates a read from a slave device and a logic zero indicates a write to a slave device. this signal is driven by the mpc801 when it is the owner of the bus. it is input when an external master initiates a transaction on the bus and is sampled internally so the memory controller can control the accessed slave device. burst e1 burst transaction ?his three-state signal is driven by the bus master to indicate that the current initiated transfer is a burst one. this signal is driven by the mpc801 when it is the owner of the bus. it is input when an external master initiates a transaction on the bus; this signal and is sampled internally so the memory controller can control the accessed slave device. bdip gplb5 c3 burst data in progress ?hen accessing a slave device in the external bus, the master on the bus asserts this signal to indicate that the data beat in front of the current one is the one requested by the master. this signal is negated prior to the expected last data beat of the burst transfer. general-purpose line b5 ?his signal is used by the memory controller when the user programmable machine b (upmb) takes control of the slave access. ts b1 transfer start this three-state signal is asserted by the bus master to indicate the start of a bus cycle that transfers data to or from a slave device. this signal is driven by the master only when it has gained ownership of the bus. every master should negate this signal before the bus relinquishes. a pull-up resistor should be connected to this signal to prevent a slave device from detecting a spurious bus accessing it when no master is taking ownership of the bus. this signal is sampled by the mpc801 when it is not the owner of the external bus so the memory controller can control the accessed slave device. it indicates that an external synchronous master initiated a transaction.
external signals motorola mpc801 user? manual 2-3 2 ta b2 transfer acknowledge ?his bidirectional three-state signal indicates that the slave device addressed in the current transaction has accepted the data transferred by the master (write) or has driven the data bus with valid data (read). the signal behaves as an output when the memory controller takes control of the transaction. the only exception occurs when the memory controller is controlling the slave access by means of the gpcm and the corresponding option register is instructed to wait for an external assertion of the transfer acknowledge line. every slave device should negate the ta signal after the end of the transaction and immediately three-state it to avoid contentions on the line if a new transfer is initiated addressing other slave devices. a pull-up resistor should be connected to this signal to keep a master device from detecting the assertion of this signal when no slave is addressed in a transfer or when the address detection for the addressed slave is slow. tea a1 transfer error acknowledge ?his open-drain signal indicates that a bus error occurred in the current transaction. it is driven asserted by the mpc801 when the bus monitor does not detect a bus cycle termination within a reasonable amount of time. the assertion of tea causes the termination of the current bus cycle, thus ignoring the state of ta . bi d3 burst inhibit ?his bidirectional three-state signal indicates that the slave device addressed in the current burst transaction is unable to support burst transfers. the signal behaves as an output when the memory controller takes control of the transaction. when the mpc801 drives out the signal for a specific transaction, it asserts or negates bi during the transaction according to the value specified by the user in the appropriate control registers. it negates the signal after the end of the transaction and immediately three-states it to avoid contentions if a new transfer is initiated addressing other slave devices. rsv irq2 g4 reservation ?his three-state signal is output by the mpc801 in conjunction with the address bus to indicate that the internal core initiated a transfer as a result of a stwcx or lwarx instruction. interrupt request 2 ?his input is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. kr /retry irq4 i2 kill reservation ?his input is used as a part of the storage reservation protocol when the mpc801 initiated a transaction as the result of a stwcx instruction. retry ?his input signal is used by the slave device to indicate that it is unable to accept the transaction. the mpc801 must relinquish ownership of the bus and initiate the transaction again after winning the bus arbitration. interrupt request 4 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq4 ) and the dp1/irq4 (if defined to function as irq4 ). cr irq 3 d1 cancel reservation ?his input signal is used as a part of the storage reservation protocol. interrupt request 3 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq3 ) and the dp0/irq3 if defined to function as irq3 . d[0:31] see table 2-2 for pin breakout data bus ?his bidirectional three-state bus provides the general-purpose data path between the mpc801 and all other devices. although the data path is a maximum of 32 bits wide, it can be dynamically sized to support 8-, 16-, or 32-bit transfers. d0 is the most-significant bit of the data bus. dp0 irq 3 m5 data parity 0 ?his bidirectional three-state signal provides parity generation and checking for the data bus lane d[0:7] by transferring to a slave device initiated by the mpc801. the parity function can be defined independently for each one of the addressed memory banks (if controlled by the memory controller) and for the rest of the slaves sitting on the external bus. interrupt request 3 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq3 ) and the cr /irq3 if defined to function as irq3 . table 2-1. signal descriptions (continued) pin name pin number description
external signals 2-4 mpc801 user? manual motorola 2 dp1 irq4 o5 data parity 1 ?his bidirectional three-state signal provides parity generation and checking for the data bus lane d[8:15] by transferring to a slave device initiated by the mpc801. the parity function can be defined independently for each one of the addressed memory banks (if controlled by the memory controller) and for the rest of the slaves on the external bus. interrupt request 4 ?his input is one of the eight external lines that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq4 ) and the kr/retry /irq4 if defined to function as irq4 . dp2 irq5 o4 data parity 2 ?his bidirectional three-state signal provides parity generation and checking for the data bus lane d[16:23] by transferring to a slave device initiated by the mpc801. the parity function can be defined independently for each one of the addressed memory banks (if controlled by the memory controller) and for the rest of the slaves on the external bus. interrupt request 5 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq6 ) and the dsdi/irq5 if defined to function as irq5 . dp3 irq6 n4 data parity 3 ?his bidirectional three-state signal provides parity generation and checking for the data bus lane d[24:31] by transferring to a slave device initiated by the mpc801. the parity function can be defined independently for each one of the addressed memory banks (if controlled by the memory controller) and for the rest of the slaves on the external bus. interrupt request 6 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq6 ) and the frz/irq6 if defined to function as irq6 . br e3 bus request ?his bidirectional signal is asserted low when a possible master is requesting ownership of the bus. when the mpc801 is configured to operate with the internal arbiter, this signal is configured as an input. however, when the mpc801 is configured to operate with an external arbiter, this signal is configured as an output and asserted every time a new transaction is intended to be initiated and no parking on the bus is granted. bg d2 bus grant ?his bidirectional signal is asserted low when the arbiter of the external bus grants the specific master ownership of the bus. when the mpc801 is configured to operate with the internal arbiter, this signal is configured as an output and asserted every time the external master asserts the br signal and its priority request is higher than any of the internal sources requiring the initiation of a bus transfer. however, when the mpc801 is configured to operate with an external arbiter, this signal is configured as an input. bb c2 bus busy ?his bidirectional signal is asserted low by a master to show that it owns the bus. the mpc801 asserts this signal after the bus arbiter grants it bus ownership and the bb signal is negated. frz irq6 e2 freeze ?his output signal is asserted to indicate that the internal core is in debug mode. interrupt request 6 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq6 ) and the dp3/irq6 (if defined to function as irq6 .) irq0 n15 interrupt request 0 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. irq1 n16 interrupt request 1 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. irq7 m17 interrupt request 7 ?his input signal is one of the eight external signals that can request (by means of the internal interrupt controller) a service routine from the core. table 2-1. signal descriptions (continued) pin name pin number description
external signals motorola mpc801 user? manual 2-5 2 cs [0:7] see table 2-2 for pin breakout chip select 0??hese output signals enable peripheral or memory devices at programmed addresses if they are appropriately defined in the memory controller. cs0 can be configured to be the global chip-select for the boot device. we0 bs_ab0 c9 write enable 0 ?his output signal is asserted when a write access to an external slave controlled by the gpcm in the memory controller is initiated by the mpc801. we0 is asserted if the data lane d[0:7] contains valid data to be stored by the slave device. byte select 0 on upma or upmb ?his output signal is asserted as required by the upma or upmb in the memory controller whenever you program it. in a read or write transfer, the signal is only asserted if the data lane d[0:7] contains valid data. we1 bs_ab1 a10 write enable 1 ?his output signal is asserted when the mpc801 initiates a write access to an external slave controlled by the gpcm in the memory controller. we1 is asserted if the data lane d[8:15] contains valid data to be stored by the slave device. byte select 1 on upma or upmb ?his output signal is asserted as required by the upma or upmb in the memory controller whenever you program it. in a read or write transfer, the signal is only asserted if the data lane d[8:15] contains valid data. we2 bs_ab2 a9 write enable 2 ?his output signal is asserted when the mpc801 initiates a write access to an external slave controlled by the gpcm in the memory controller. we2 is asserted if the data lane d[16:23] contains valid data to be stored by the slave device. byte select 2 on upma or upmb ?his output signal is asserted as required by the upma or upmb in the memory controller whenever you program it. in a read or write transfer, the signal is only asserted if the data lane d[16:23] contains valid data. we3 bs_b3 c8 write enable 3 ?his output signal is asserted when the mpc801 initiates a write access to an external slave controlled by the gpcm in the memory controller. we3 is asserted if the data lane d[24:31] contains valid data to be stored by the slave device. byte select 3 on upma or upmb ?his output signal is asserted as required by the upma or upmb in the memory controller whenever you program it. in a read or write transfer, the signal is only asserted if the data lane d[24:31] contains valid data. gpla0 gplb0 b8 general-purpose line 0 on upma ?his output signal reflects the value specified in the upma in the memory controller when an external transfer to a slave is controlled by the user programmable machine a (upma). general-purpose line 0 on upmb ?his output signal reflects the value specified in the upmb in the memory controller when an external transfer to a slave is controlled by the user programmable machine b (upmb). oe gpla1 gplb1 a7 output enable ?his output signal is asserted when the mpc801 initiates a read access to an external slave controlled by the gpcm in the memory controller. general-purpose line 1on upma ?his output signal reflects the value specified in the upma in the memory controller when an external transfer to a slave is controlled by the user programmable machine a (upma). general-purpose line 1 on upmb ?his output signal reflects the value specified in the upmb in the memory controller when an external transfer to a slave is controlled by the user programmable machine b (upmb). gpla [2:3] gplb [2:3] cs [2:3] b7 and c7 general-purpose lines 2 and 3 on upma ?hese output signals reflect the value specified in the upma in the memory controller when an external transfer to a slave is controlled by the user programmable machine a (upma). general-purpose lines 2 and 3 on upmb ?hese output signals reflect the value specified in the upmb in the memory controller when an external transfer to a slave is controlled by the user programmable machine b (upmb). chip select 2 and 3 ?hese output signals enable peripheral or memory devices at programmed addresses if they are appropriately defined in the memory controller. the double drive capability for cs2 and cs3 is independently defined for each signal in the siumcr. table 2-1. signal descriptions (continued) pin name pin number description
external signals 2-6 mpc801 user? manual motorola 2 upwaita gpla4 a2 user programmable machine wait a ?his input signal is sampled as you need it when an access to an external slave is controlled by the upma in the memory controller. general-purpose line 4 on upma ?his output signal reflects the value specified in the upma in the memory controller when an external transfer to a slave is controlled by the user programmable machine a (upma). upwaitb gplb 4 a3 user programmable machine wait b ?his input signal is sampled as you need it when an access to an external slave is controlled by the upmb in the memory controller. general-purpose line 4 on upmb ?his output signal reflects the value specified in the upmb in the memory controller when an external transfer to a slave is controlled by the user programmable machine b (upmb). gpla5 b3 general-purpose line 5 on upma ?his output signal reflects the value specified in the upma in the memory controller when an external transfer to a slave is controlled by the user programmable machine a (upma). this signal can also be controlled by the upmb. poreset m3 power -on reset ?hen asserted, this input signal causes the mpc801 to enter the power-on reset state. rstconf n2 reset configuration ?his input signal is sampled by the mpc801 during the assertion of the hreset signal. if it is asserted, the configuration mode is sampled in the form of the hard reset configuration word driven on the data bus. when this signal is negated, the default configuration mode is adopted by the mpc801. notice that the initial base address of internal registers is determined in this sequence. hreset m2 hard reset ?his open drain line, when asserted, causes the mpc801 external crystal to enter the hard reset state. sreset l3 soft reset ?his open drain line, when asserted, causes the mpc801 external crystal to enter the soft reset state. xtal n1 this output signal is one of the connections to an external crystal for the internal oscillator circuitry. extal m1 this signal is one of the connections to an external crystal for the internal oscillator circuitry. xfc o3 external filter capacitance ?his input signal is the connection pin to an external capacitor filter for the pll circuitry. clkout p5 clock out ?his output signal is the clock system frequency. extclk l1 external clock ?his input signal is the external input clock from an external source. texp l2 timer expired ?his output signal reflects the status of the texps bit in the plprcr in the clock interface. dsck/at1 h4 development serial clock ?his input signal is the clock for the debug port interface. address type 1 ?his bidirectional three-state signal is driven by the mpc801 when it initiates a transaction on the external bus. when the transaction is initiated by the internal core, it indicates if the transfer is for problem or privilege state. iwp[0:1] vfls[0:1] g1 and g2 instruction watchpoint 0-1 ?hese output signals report the detection of an instruction watchpoint in the program flow executed by the internal core. visible history buffer flushes status ?hese output signals are output by the mpc801 when you need program instructions flow tracking. they report the number of instructions flushed from the history buffer in the internal core. at2 h2 address type 2 ?his bidirectional three-state signal is driven by the mpc801 when it initiates a transaction on the external bus. when the transaction is initiated by the internal core, it indicates if the transfer is instruction or data. table 2-1. signal descriptions (continued) pin name pin number description
external signals motorola mpc801 user? manual 2-7 2 iwp2 vf2 f1 instruction watchpoint 2 ?his output signal reports the detection of an instruction watchpoint in the program flow executed by the internal core. visible instruction queue flush status ?his output signal, together with vf0 and vf1, is output by the mpc801 when you need program instructions flow tracking. vf x reports the number of instructions flushed from the instruction queue in the internal core. lwp0 vf0 f2 load/store watchpoint 0 ?his output signal reports the detection of a data watchpoint in the program flow executed by the internal core. visible instruction queue flushes status ?his output signal, combined with vf1 and vf2, is output by the mpc801 when you need program instructions flow tracking. vf reports the number of instructions flushed from the instruction queue in the internal core. lwp1 vf1 g3 load/store watchpoint 1 ?his output signal reports the detection of a data watchpoint in the program flow executed by the internal core. visible instruction queue flushes status ?his output signal, combined with vf0 and vf2, is output by the mpc801 when you need program instructions flow tracking. vf reports the number of instructions flushed from the instruction queue in the internal core. dsdi irq5 i3 development serial data input ?his input signal is the data in for the debug port interface. interrupt request 5 ?his input signal is one of the eight external signals that can request through the internal interrupt controller, a service routine from the core. it should be noted that the interrupt request signal that is sent to the interrupt controller is the logical and of this signal (if defined to function as irq5 ) and the dp2/irq5 (if defined to function as irq5 ). ptr at3 h3 program trace ?his output signal is asserted by the mpc801 to indicate an instruction fetch is taking place to allow program flow tracking. address type 3 ?his bidirectional three-state signal is driven by the mpc801 when it initiates a transaction on the external bus. when the transaction is initiated by the internal core, it indicates if the transfer is reserved for data transfers or a program trace indication for instructions fetch. modck1 sts j3 mode clock 1 ?his input signal is sampled at poreset negation to configure the pll/clock mode of operation. special transfer start ?his output signal is driven by the mpc801 to indicate the start of a transaction on the external bus or to signal the beginning of an internal transaction in show cycle mode. modck2 dsdo j2 mode clock 2 ?his input signal is sampled at poreset negation to configure the pll/clock mode of operation. development serial data output ?his output signal is the data out of the debug port interface. baddr[28:30] j1, i1, and h1 burst address ?hese output signals duplicate the value of a[28:29] when: an internal master in the mpc801 initiates a transaction on the external bus. an asynchronous external master initiates a transaction. a synchronous external master initiates a single beat transaction. these signals are used by the memory controller to allow increments in the address lines that connect to memory devices when a synchronous external or internal master initiates a burst transfer. as i4 address strobe ?his input signal is driven by an external asynchronous master to indicate a valid address on the a[6:31] signals. the memory controller in the mpc801 synchronizes this signal and controls the memory device addressed under its control. pb[31] spisel f16 general-purpose i/o port b bit 31 ?his is bit 31 of the general-purpose i/o port b. spisel ?his is the serial peripheral interface slave select input pin. pb[30] spiclk g13 general-purpose i/o port b bit 30 ?his is bit 30 of the general-purpose i/o port b. spiclk ?his is the serial peripheral interface output clock when it is configured as a master or serial peripheral interface input clock when it is configured as a slave. table 2-1. signal descriptions (continued) pin name pin number description
external signals 2-8 mpc801 user? manual motorola 2 pb[29] spimosi g15 general-purpose i/o port b bit 29 ?his is bit 29 of the general-purpose i/o port b. spimosi ?his is the serial peripheral interface output data when it is configured as a master or serial peripheral interface input data when it is configured as a slave. pb[28] spimiso g16 general-purpose i/o port b bit 28 ?his is bit 28 of the general-purpose i/o port b. spimiso ?his is the serial peripheral interface input data when it is configured as a master or serial peripheral interface output data when it is configured as a slave. pb[27] i2csda h14 general-purpose i/o port b bit 27 ?his is bit 27 of the general-purpose i/o port b. i2csda ?his is the i 2 c serial data pin. it is bidirectional and should be configured as an open-drain output. pb[26] i2cscl h15 general-purpose i/o port b bit 26 ?his is bit 26 of the general-purpose i/o port b. i2cscl ?his is the i 2 c serial clock pin. it is bidirectional and should be configured as an open-drain output. pb[25] ugpio1 j13 general-purpose i/o port b bit 25 ?his is bit 25 of the general-purpose i/o port b. ugpio1 ?his is the general-purpose input/output pin of uart1. it can be configured as a general input or output or it can serve as the source of the clock to the baud rate generator. it can also output the bit clock at the selected baud rate. pb[24] ugpio2 j15 general-purpose i/o port b bit 24 ?his is bit 24 of the general-purpose i/o port b. ugpio2 ?his is the general-purpose input/output pin of uart2. it can be configured as a general input or output or it can serve as the source of the clock to the baud rate generator. it can also output the bit clock at the selected baud rate. pb[23] ucts1 k16 general-purpose i/o port b bit 23 ?his is bit 23 of the general-purpose i/o port b. ucts1 ?his is an active low clear-to-send input of uart1 that is used to control the transmitter. pb[22] ucts2 k15 general-purpose i/o port b bit 22 this is bit 22 of the general-purpose i/o port b. ucts2 ?his is an active low clear-to-send input of uart2 that is used to control the transmitter. pb[21] urxd1 k14 general-purpose i/o port b bit 21 ?his is bit 21 of the general-purpose i/o port b. urxd1 ?his signal is the receive data serial input of uart1. pb[20] urxd2 l16 general-purpose i/o port b bit 20 ?his is bit 20 of the general-purpose i/o port b. urxd2 ?his signal is the receive data serial input of uart2. pb[19] urts1 l15 general-purpose i/o port b bit 19 ?his is bit 19 of the general-purpose i/o port b. urts1 ?his is an active low ready-to-send output from uart1 used to indicate that the receiver is ready. pb[18] urts2 l14 general-purpose i/o port b bit 18 ?his is bit 18 of the general-purpose i/o port b. urts2 ?his is an active low ready-to-send output from uart2 used to indicate that the receiver is ready. pb[17] utxd1 m16 general-purpose i/o port b bit 17 ?his is bit 17 of the general-purpose i/o port b. utxd1 ?his signal is the transmit data serial output from uart1. pb[16] utxd2 m15 general-purpose i/o port b bit 16 ?his is bit 16 of the general-purpose i/o port b. utxd2 ?his signal is the transmit data serial output from uart1. table 2-1. signal descriptions (continued) pin name pin number description
external signals motorola mpc801 user? manual 2-9 2 power supply a8, j16, k1, and p9 p3 p2 p1 o1 vddh ?his signal is the power supply of the i/o buffers and certain parts of the clock control. vddsyn ?his signal is the power supply of the pll circuitry. vsssyn?his signal is the power supply for the clock synthesizer. vsssyn1?his signal is the power supply for the clock synthesizer. kapwr ?his signal is the power supply of the internal oscillator, real-time clock, periodic interrupt timer, decrementer, and timebase. tck dsck i15 test clock ?his input signal is the clock of the jtag interface. development serial clock ?his input signal is the clock for the debug port interface. tms h13 test mode select ?his input signal controls the scan chain test mode operations. it should be powered through a pull-up resistor if unused. tdi dsdi i16 test data input ?his input signal is the data in for the jtag interface. development serial data input ?his input signal is the data for the debug port interface. tdo dsdo h16 test data output ?his three-state output signal is the data out of the jtag interface. development serial data output ?his output signal is the data out of the debug port interface. trst i17 test reset ?his input signal is the asynchronous reset of the tap machine on the jtag interface. table 2-1. signal descriptions (continued) pin name pin number description
external signals 2-10 mpc801 user? manual motorola 2 table 2-2. pin breakout pin name pin number address bus pins 6?1 a6 g17 a7 e16 a8 f15 a9 d16 a10 g15 a11 f17 a12 c16 a13 d15 a14 e17 a15 b15 a16 c15 a17 c14 a18 b12 a19 a15 a20 b17 a21 c13 a22 c11 a23 b13 a24 a14 a25 c12 a26 b11 a27 a16 a28 a12 a29 b16 a30 a13 a31 a11
external signals motorola mpc801 user? manual 2-11 2 data bus pins 0?1 d0 o16 d1 p17 d2 p12 d3 p11 d4 p16 d5 p10 d6 p8 d7 p6 d8 n14 d9 o13 d10 n11 d11 p13 d12 p12 d13 o15 d14 m10 d15 n10 d16 m9 d17 o14 d18 o10 d19 n9 d20 o9 d21 n8 d22 o8 d23 n12 d24 o7 d25 n7 d26 m7 d27 p15 d28 n6 d29 o6 d30 n5 d31 m6 table 2-2. pin breakout (continued) pin name pin number
external signals 2-12 mpc801 user? manual motorola 2 chip select pins 0? cs0 b4 cs1 a4 cs2 c5 cs3 b5 cs4 a6 cs5 b6 cs6 c6 cs7 a5 table 2-2. pin breakout (continued) pin name pin number
motorola mpc801 user? manual 3-1 3 section 3 memory map the mpc801 internal memory resources are mapped within a contiguous block of 16k storage. the location of this block within the global 4g real storage space can be mapped on 64k resolution through an implementation specific special register called the internal memory map register. refer to section 12 system interface unit and appendix a quick reference guide to mpc801 registers for more information. the following table defines the internal memory map of the mpc801. table 3-1. mpc801 internal memory map internal address mnemonic name size general system interface unit 000 siumcr siu module configuration register 32 004 sypcr system protection control register 32 008 res reserved 00e swsr software service register 16 010 sipend siu interrupt pending register 32 014 simask siu interrupt mask register 32 018 siel siu interrupt edge level mask register 32 01c sivec siu interrupt vector register 32 020 tesr transfer error status register 32 024 to 02f res reserved uart1 controller 040 cntreg1 control register 16 044 baudreg1 baud control register 16 048 globreg1 global register 16 04c rxreg1 receiver register 16 050 txreg1 transmitter register 16 054 rxreg1 receiver register (special read mode) 16 058 to 05f res reserved
memory map 3-2 mpc801 user? manual motorola 3 uart2 controller 060 cntreg2 control register 16 064 baudreg2 baud control register 16 068 globreg2 global register 16 06c rxreg2 receiver register 16 070 txreg2 transmitter register 16 074 rxreg2 receiver register (special read mode) 16 078 to 0ff res reserved memory controller 100 br0 base register bank 0 32 104 or0 option register bank 0 32 108 br1 base register bank 1 32 10c or1 option register bank 1 32 110 br2 base register bank 2 32 114 or2 option register bank 2 32 118 br3 base register bank 3 32 11c or3 option register bank 3 32 120 br4 base register bank 4 32 124 or4 option register bank 4 32 128 br5 base register bank 5 32 12c or5 option register bank 5 32 130 br6 base register bank 6 32 134 or6 option register bank 6 32 138 br7 base register bank 7 32 13c or7 option register bank 7 32 140 to 163 res reserved 164 mar memory address register 32 168 mcr memory command register 32 16c to 16f res reserved 170 mamr machine a mode register 32 174 mbmr machine b mode register 32 178 mstat memory status register 16 table 3-1. mpc801 internal memory map (continued) internal address mnemonic name size
memory map motorola mpc801 user? manual 3-3 3 17a mptpr memory periodic timer prescaler 16 17c mdr memory data register 32 i 2 c controller 180 i2cer i 2 c event register 8 184 i2cmr i 2 c mask register 8 188 i2crd i 2 c receive data register 16 18c i2ctd i 2 c register 16 190 i2mod i 2 c mode register 8 194 i2add i 2 c address register 8 198 i2brg i 2 c brg register 8 19c i2com i 2 c command register 8 1a0 to 1af res reserved serial controller 1b0 seccom serial controller command register 8 1b4 to 1bf res reserved serial peripheral interface 1c0 spier spi event register 8 1c4 spimr spi mask register 16 1c8 spird spi receive data register 32 1cc spitd spi transmit data register 32 1d0 spmode spi mode register 16 1d4 spcom spi command register 8 1d8 to 1df res reserved port b 1e0 pbodr port b open-drain register 16 1e4 pbdat port b data register 16 1e8 pbdir port b data direction register 16 1ec pbpar port b pin assignment register 16 af0 to 1ff res reserved table 3-1. mpc801 internal memory map (continued) internal address mnemonic name size
memory map 3-4 mpc801 user? manual motorola 3 system integration timers 200 tbscr timebase status and control register 16 204 tbreff0 timebase reference register 0 32 208 tbreff1 timebase reference register 1 32 20c to 21f res reserved 220 rtcsc real-time clock status and control register 16 224 rtc real-time clock register 32 228 rtsec real-time alarm seconds 32 22c rtcal real-time alarm register 32 230 to 23f res reserved 240 piscr periodic interrupt status and control register 16 244 pitc periodic interrupt count register 32 248 pitr periodic interrupt timer register 32 24c to 27f res reserved clocks and reset 280 sccr system clock control register 32 284 plprcr pll, low-power and reset control register 32 288 rsr reset status register 32 28c to 2ff res reserved system integration timers keys 300 tbscrk timebase status and control register key 32 304 tbreff0k timebase reference register 0 key 32 308 tbreff1k timebase reference register 1 key 32 30c tbk timebase and decrementer register key 32 310 to 31f res reserved 320 rtcsck real-time clock status and control register key 32 324 rtck real-time clock register key 32 328 rtseck real-time alarm seconds key 32 32c rtcalk real-time alarm register key 32 table 3-1. mpc801 internal memory map (continued) internal address mnemonic name size
memory map motorola mpc801 user? manual 3-5 3 330 to 33f res reserved 340 piscrk periodic interrupt status and control register key 32 344 pitck periodic interrupt count register key 32 348 to 37f res reserved clocks and reset keys 380 sccrk system clock control key 32 384 plprcrk pll, low-power and reset control register key 32 388 rsrk reset status register key 32 38c to 3ff res reserved table 3-1. mpc801 internal memory map (continued) internal address mnemonic name size
memory map 3-6 mpc801 user? manual motorola 3
motorola mpc801 user? manual 4-1 4 section 4 reset the reset block has a reset control logic that determines the cause of reset, synchronizes it if necessary, and resets the appropriate logic modules. the memory controller, system protection logic, interrupt controller, and parallel i/o pins are initialized only on hard reset. soft reset initializes the internal logic while maintaining the system configuration. 4.1 types of reset the mpc801 has several types of inputs to the reset logic: power-on reset external hard reset internal hard reset loss of lock software watchdog reset checkstop reset debug port hard reset jtag reset table 4-1. possible reset results reset source reset effect reset logic and pll states reset system config reset clock module reset hreset pin driven debug port config other internal logic reset sreset pin driven power-on reset yes yes yes yes yes yes yes external hard reset loss-of-lock software watchdog check stop debug port hard reset jtag reset no yes yes yes yes yes yes external soft reset debug port soft reset no no no no yes yes yes
reset 4-2 mpc801 user? manual motorola 4 external soft reset internal soft reset debug port soft reset all of these reset sources are fed into the reset controller and, depending on the source of the reset, different actions are taken. the reset status register reflects the last source to cause a reset. 4.1.1 power-on reset power-on reset is an active low input pin called poreset . in a system with power-down low-power mode, this pin should only be activated when a voltage in the keep alive power (kapwr) rail fails. when this pin is asserted, the modck bits are sampled and the phase-locked loop multiplication factor and pitrtclk and tmbclk sources are changed to their default values. when this pin is negated, internal modck values are unchanged. the poreset pin should be asserted for a minimum of 3 microseconds. after detecting this assertion, the mpc801 enters the power-on reset state and stays there until the following events occur: the internal pll enters the lock state and the system clock is active the poreset pin is negated when poreset is asserted, the mpc801 enters the power-on reset (por) state in which sreset and hreset are asserted by the core. when the mpc801 remains in por, the extension counter of 512 is reset,and the modck pins are sampled when por pin is negated. after the negation of poreset or pll lock, the core enters the state of internal initiated hreset and continues driving the hreset and sreset pins for 512 cycles. when the timer expires, which is usually after the 512 cycles, the configuration is sampled from the data pins and the core stops driving the pins. an external pull-up resistor should drive the hreset and sreset pins high. after the pins are negated, a 16-cycle period passes before the presence of an external (hard/soft) reset is tested. refer to section 4.3.1 hard reset for more information. 4.1.2 external hard reset hreset (hard reset) is a bidirectional, active low i/o pin. the mpc801 can only detect an external assertion of hreset if it occurs while the mpc801 is not asserting reset. during hreset , sreset is asserted. hreset is an open-collector type of pin. sreset (soft reset) is a bidirectional, active low i/o pin. the mpc801 can only detect an external assertion of sreset if it occurs while the mpc801 is not asserting reset. the sreset is also an open-collector type of pin. when an external hreset is asserted, the core starts driving the hreset and sreset for 512 cycles. when the timer expires, after 512 cycles, the configuration is sampled from the data pins and the core stops driving the hreset and sreset pins. an external pull-up resistor should drive the pins high and once they are negated, a 16-cycle period passes before the presence of an external (hard/soft) reset is tested. refer to section 4.3.1 hard reset for more information.
reset motorola mpc801 user? manual 4-3 4 4.1.3 internal hard reset when the core finds a reason to assert hreset, it starts driving the hreset and sreset pins for 512 cycles. when the timer expires, after the 512 cycles, the configuration is sampled from data pins and the core stops driving the pins. an external pull-up resistor should drive the hreset and sreset pins high and once they are negated a 16-cycle period passes before the presence of an external (hard/soft) reset is tested. refer to section 4.3.1 hard reset for more information. the causes of internal hard reset are as follows: loss of lock software watchdog reset checkstop reset debug port hard reset jtag reset 4.1.3.1 loss of lock. if the pll detects a loss of lock, erroneous external bus operation occurs if synchronous external devices use the core input clock. erroneous operation could also occur if devices with a pll use the core clockout. this source of reset can be asserted if the lolre bit in the pll low-power and reset control register is set. the enabled pll loss-of-lock event generates an internal hard reset sequence. 4.1.3.2 software watchdog reset. after the core watchdog counts to zero, a software watchdog reset is asserted. the enabled software watchdog event then generates an internal hard reset sequence. 4.1.3.3 checkstop reset. if the core enters a checkstop state and the checkstop reset is enabled, the checkstop reset is asserted. the enabled checkstop event then generates an internal hard reset sequence. 4.1.3.4 debug port hard reset. when the development port receives a hard reset request from the development tool, an internal hard reset sequence is generated. in this case, the development tool must reconfigure the debug port. refer to section 18.3.3.1.2 development serial data in for more information. 4.1.3.5 jtag reset. when the jtag logic asserts the jtag soft reset signal, an internal soft reset sequence will be generated. 4.1.4 external soft reset when an external sreset is asserted, the core starts driving the sreset pin. when the timer expires, after 512 cycles, the debug port configuration is sampled from the dsdi and dsck pins and the core stops driving the pin. an external pull-up resistor should drive it high and once it is negated a 16-cycle period passes before the presence of an external soft reset is tested.
reset 4-4 mpc801 user? manual motorola 4 4.1.5 internal soft reset when the core finds a reason to assert sreset, it starts driving the sreset pin. when the timer expires, after 512 cycles, the debug port configuration is sampled from the dsdi and dsck pins and the core stops driving the sreset pin. an external pull-up resistor should drive the pin high and once it is negated a 16-cycle period passes before the presence of an external soft reset is tested. jtag and the debug port cause an internal soft reset. 4.1.5.1 debug port soft reset. when the development port receives a soft reset request from the development tool, an internal soft reset sequence is generated. in this case the development tool must reconfigure the debug port. refer to section 18.3.3.1.2 development serial data in for more information. 4.2 reset status register the 32-bit reset status register (rsr) is powered by the keep alive power supply. it is memory-mapped into the mpc801 system interface unit register map and receives its default reset values at power-on reset. ehrs?xternal hard reset status this bit is cleared by a power-on reset. when an external hard reset event is detected, this bit is set and remains that way until the software clears it. the ehrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no external hard reset event occurred. 1 = an external hard reset event occurred. esrs?xternal soft reset status this bit is cleared by a power-on reset. when an external soft reset event is detected, this bit is set and remains that way until the software clears it. the esrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no external soft reset event occurred. 1 = an external soft reset event occurred. rsr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ehrs esrs llrs swrs csrs dbhrs dbsrs jtrs reserved reset 00000000 0 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved reset 0 r/w r/w
reset motorola mpc801 user? manual 4-5 4 llrs?oss-of-lock reset status this bit is cleared by a power-on reset. when a loss-of-lock event is enabled by the lolre bit in the plprcr is detected, this bit is set and remains that way until the software clears it. the llrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no enabled loss-of-lock reset event occurred. 1 = an enabled loss-of-lock reset event occurred. swrs?oftware watchdog reset status this bit is cleared by a power-on reset. when a software watchdog expire event occurs, this bit is set and remains that way until the software clears it. the swrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no software watchdog reset event occurred. 1 = a software watchdog reset event occurred. csrs?heck stop reset status this bit is cleared by a power-on reset. when the core enters the checkstop state and the checkstop reset is enabled by the csr bit in the plprcr, this bit is set and remains that way until the software clears it. the csrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no enabled checkstop reset event occurred. 1 = an enabled checkstop reset event occurred. dbhrs?ebug port hard reset status this bit is cleared by a power-on reset. when the debug port hard reset request is set, this bit is set and remains that way until the software clears it. the dbhrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no debug port hard reset request occurred. 1 = a debug port hard reset request occurred. dbsrs?ebug port soft reset status this bit is cleared by a power-on reset. when the debug port soft reset request is set, this bit is set and remains that way until the software clears it. the dbsrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no debug port soft reset request occurred. 1 = a debug port soft reset request occurred. jtrs?tag reset status this bit is cleared by a power-on reset. when the jtag reset request is set, this bit is set and remains that way until the software clears it. the jtrs bit can be negated by writing a 1, but a write of zero has no effect on it. 0 = no jtag reset event occurred. 1 = a jtag reset event occurred.
reset 4-6 mpc801 user? manual motorola 4 bits 8?1?eserved these bits are reserved and should be set to 0. 4.3 how to configure reset in normal operation, you can configure reset with a hard reset. however, to configure the development port you should use a soft reset. 4.3.1 hard reset when a hard reset event occurs, the mpc801 reconfigures its hardware system as well as the development port configuration. the logical value of the bits that determine its initial mode of operation are sampled either from the data bus or from an internal default constant (d[0:31]=x?0000000). if, at sampling time, rstconf is asserted, the configuration is sampled from the data bus. otherwise, it is sampled from the internal default. while hreset and rstconf are asserted, the mpc801 pulls the data bus low through a weak resistor. you can overwrite this default by driving high to the appropriate bit (see figure 4-1). the hardware reset configuration scheme for poreset assertion is shown in figures 4-2 through 4-4. while the poreset input signal is being asserted, the core assumes the default reset configuration that changes when poreset is negated or the clkout signal starts oscillating. in this last case, the hardware configuration is sampled every nine clock cycles on the rising edge of the clkout. the setup time required for the data bus is 15 cycles and the maximum rise time of hreset should be less than six clock cycles. refer to section 4.3.2 soft reset for more information. figure 4-1. reset configuration basic scheme hreset dx (data line) rstconf mux configuration word mpc801
reset motorola mpc801 user? manual 4-7 4 figure 4-2. reset configuration sampling scheme for short poreset assertion figure 4-3. reset configuration sampling scheme for long poreset assertion clkout poreset hreset rstconf intporeset default rstconf controlled tsup d[0:31] clkout poreset hreset rstconf intporeset default rstconf controlled tsup d[0:31]
reset 4-8 mpc801 user? manual motorola 4 figure 4-4. reset configuration sampling timing requirements clkout hreset rstconf data 12345678910111213141516 maximum time of reset recognition reset configuration word maximum setup time of reset recognition 17 sample data configuration sample data configuration sample data configuration
reset motorola mpc801 user? manual 4-9 4 4.3.1.1 hard reset configuration word the hard reset configuration word register is sampled from the data bus and default of the bits. earb?xternal arbitration if this bit is set (1), external arbitration is assumed. if it is cleared (0), then internal arbitration is performed. see section 12.12.1.1 siu module configuration register for more information. ip ?nitial interrupt prefix this bit defines the initial value of the msr ip immediately after reset. the msr ip bit defines the interrupt table location. if ip is zero (default), the msr ip initial value is one, but if it is sampled one, the msr ip initial value is zero. see section 6.3.1.2.1 machine state register . bits 2, 6, and 15?eserved these bits are reserved and should be set to 0. bps?oot port size this field defines the port size of the boot device as shown in the following chart. 00 = 32-bit port size. 01 = 8-bit port size. 10 = 16-bit port size. 11 = reserved. isb?nitial internal space base select this field defines the initial value of the immr bits 0-15 and determines the base address of the internal memory space. 00 = $00000000. 01 = $00f00000. 10 = $ff000000. 11 = $fff00000. hard reset configuration word bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field earb ip res bdis bps res isb dbgc dbpc ebdf res reset 00000000000 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved reset 0
reset 4-10 mpc801 user? manual motorola 4 dbgc?ebug pins configuration this field configures the functionality of the following pins. 0x = iwp[0:1]/vfls[0:1] functions as iwp[0:1]. iwp2/vf2 functions as iwp2. lwp0/vf0 functions as lwp0. lwp1/vf1 functions as lwp1. modck1/sts functions as sts . dsck/at1 functions as at1. dsdi/irq5 functions as irq5 . ptr /at3 functions as at3. modck2/dsdo functions as dsdo. 10 = reserved. 11 = iwp[0:1]/vfls[0:1] functions as vfls[0:1]. iwp2/vf2 functions as vf2. lwp0/vf0 functions as vf0. lwp1/vf1 functions as vf1. modck1/sts functions as sts . dsck/at1 functions as at1. dsdi/irq5 functions as irq5 . ptr /at3 functions as at3. modck2/dsdo functions as dsdo. dbpc?ebug port pins configuration this field configures the following pins on which the development port is active. 00 = dsck/at1 functions as defined by dbgc dsdi/irq5 functions as defined by dbgc ptr /at3 functions as defined by dbgc tck/dsck functions as dsck tdi/dsdi functions as dsdi tdo/dsdo functions as dsdo 01 = dsck/at3 functions as defined by dbgc dsdi/irq5 functions as defined by dbgc ptr /at3 functions as defined by dbgc tck/dsck functions as tck tdi/dsdi functions as tdi tdo/dsdo functions as tdo 10 = reserved. 11 = dsck/at1 functions as dsck dsdi/irq5 functions as dsdi ptr /at3 functions as ptr tck/dsck functions as tck tdi/dsdi functions as tdi tdo/dsdo functions as tdo
reset motorola mpc801 user? manual 4-11 4 ebdf?xternal bus division factor these bits define the frequency division factor between gclk1/gclk2 and gclk1_50/ gclk2_50. clkout is similar to gclk2_50. the gclk2_50 and gclk1_50 are used by the external system, the bus interface, and the memory controller to interface with the external system. the ebdf bits are initialized during hreset using the hard reset configuration mechanism. cles?ore little-endian swap if this bit is set (1), the little-endian swapper at the external bus interface is activated for core accesses after reset. if it is cleared (0), the little-endian swapper at the is not activated for core accesses after reset. see section 14 endian modes for more information. 4.3.2 soft reset when a soft reset event occurs, the mpc801 reconfigures the development port. refer to section 18.3.2.2 entering debug mode and section 18.3.3.3.1 clock mode selection for more information.
reset 4-12 mpc801 user? manual motorola 4
motorola mpc801 user? manual 5-1 5 section 5 clocks and power control the powerquicc has an on-chip oscillator, clock synthesizer, and low-power divider that gives you a comprehensive set of choices for generating system clocks. they provide you with many opportunities to save power and system cost without forcing you to sacrifice flexibility or control. the main timing reference for the mpc801 can be a high frequency crystal of 4mhz, a low frequency crystal of 32khz, or an external frequency source at 4mhz or the system frequency. the on-chip phase-locked loop (pll) can multiply the output of the crystal circuit up to the final system frequency. a crystal circuit consists of a parallel resonant crystal, two capacitors, and two resistors. notice that the values shown as example values are based on inhouse designs and your circuit might require slightly different values to operate properly. crystals are typically much cheaper than similar speed oscillators, but they may not be as stable since they are affected by parameters like trace length, component quality, board layout, and mpc801 shrink level. for the most part, they are usually stable, but it is impossible to guarantee that they will remain that way because the mpc801 process may change or the external component may shift. note the internal frequency of the mpc801 and the output of the clko pins is dependent on the quality of the crystal circuit and the multiplication factor used in the pllcr. the system operating frequency is generated through a programmable phase-locked loop called the system pll (spll). the spll is programmable in integer multiples of input oscillator frequency to generate the internal operating frequency that should be at least 15mhz. it can be divided by a power of two to generate the system operating frequencies. another responsibility of the mpc801 and part of the clock section are the clocks to the timebase, decrementer, real-time clock, and periodic interrupt counter. the oscillator, timebase, decrementer, real-time clock, and periodic interrupt counter are all powered by the keep alive power supply (kapwr) that allows the counters to continue counting at 32khz/4mhz, even when the main power to the mpc801 is off. while the power is off, the periodic interrupt timer can be used to notify the integrated circuit power supply that power should be sent to the system at specific intervals. this is the power-down wake-up feature. when the core is not in power-down low-power mode, the keep alive power (kapwr) is powered to the same voltage value as that of the i/o buffers and logic. therefore, if the internal power supply is 2v and the i/o buffers and logic voltage are 3.3v, the kapwr is (2.9 ? 3.3)v. for more details refer to section 5.1 the clock module and section 5.10.1 configuration . figure 5-1 illustrates the clock unit? functional block diagram.
clocks and power control 5-2 mpc801 user? manual motorola 5 figure 5-1. clock unit block diagram spll clock gclk1/gclk2 gclkc1/gclkc2 oscclk vcoout clkout 2:1 mux clkout clock module and system low power control xfc tmbclk tmbclk lock vddsyn drivers driver driver main clock xtal extal 2:1 mux oscillator 2:1 mux tbclk ( /4 or /16 ) modck[1:2] pitrtclk brgclk extclk syncclk 2:1 mux low power dividers (1/2n) /4 or /512 gclk2 tbs rtsel rtdiv gclk1_50/gclk2_50 real-time clock/periodic interrupt timer clock and driver
clocks and power control motorola mpc801 user? manual 5-3 5 5.1 the clock module the mpc801 clock module consists of the main crystal oscillator, the spll, low-power divider, clock generator/driver blocks, and clock module/system low-power control block. the clock module and system low-power control block receives control bits from the system clock control register, the pll, the low-power and reset control register, and the reset status register. to improve noise immunity, the charge pump and the vco of the spll have their own set of power supply pins (vddsyn and vsssyn), whereas kapwr and vss power the following clock unit modules. oscillator pitrtclk and tmbclk generation logic ?b decrementer real-time clock periodic interrupt timer system clock and reset control register (sccr) pll low-power and reset control register (pllrcr) reset status register (rsr) all other circuits are powered by the normal supply pins?ddh/vddl and vss. vddh feeds the i/o buffers and logic and vddl supplies the internal chip logic to reduce system power consumption. however, the power supply connected to vddh should be at least as big as the one connected to vddl. the power supply for each block is listed in table 5-1 and described in section 5.9 basic power structure . table 5-1. mpc801 power supply vddh vddl vddsyn kapwr i/o pad logic x clkout x spll (digital) x clock block x internal logic x clock drivers x spll (analog) x main oscillator x sccr, pllrcr and rsr x rtc, pit, tb, and dec x note: x denotes that the power supply is used.
clocks and power control 5-4 mpc801 user? manual motorola 5 the following are the relationships between different power supplies: vddh = vddsyn = 3.3v 10% vddh 3 vddl 3 2.2v 10% vddh 3 kapwr 3 vddh - 0.4v at normal operation kapwr 3 2v in power-down mode the timing diagram for the internal clocks generated in the mpc801 is illustrated in figure 5-2. figure 5-2. mpc801 clocks timing diagram gclk1 gclk2 gclk1_50 gclk2_50 clkout t1 t2 t3 t4 gclk1_50 gclk2_50 (ebdf=00) (ebdf=00) (ebdf=01) (ebdf=01) clkout (ebdf=00) (ebdf=01)
clocks and power control motorola mpc801 user? manual 5-5 5 gclk1_50, gclk2_50, and clkout can have a lower frequency than gclk1 and gclk2. this allows the external bus to operate at lower frequencies as controlled by the ebdf bit in the sccr. gclk2_50 always rises simultaneously with gclk2. if the mpc801 is working with dfnh = 0, gclk2_50 has a 50% duty-cycle. with other values of dfnh or dfnl, the duty-cycle is less than 50%. gclk1_50 rises simultaneously with gclk1, but when the mpc801 is not in gear mode, the falling edge of gclk1_50 occurs in the middle of the high phase of gclk2_50 and ebdf determines the division factor between gclk1/2 and gclk1/2_50. see figure 5-6 for more information. to configure the clock source for the spll and clock drivers, the modck1 and modck2 pins are sampled on the rising edge of the poreset pin. the configuration modes are shown in the table below. modck1 specifies the input source to the spll and, combined with modck2, specifies the multiplication factor (mf) at reset. if the pitrtclk and tmbclk configuration and the spll multiplication factor must be unaffected in the power-down low-power mode, the modck1 and modck2 pins should not be sampled on wake-up from this mode. in this case, the poreset pin should remain negated while the hreset pin is asserted during the power-up wake-up stage. when the modck1 bit is clear (0), the output of the oscillator with a 4mhz or 32mhz frequency is the input of the spll, but when it is set, the external clock input (extclk) is selected. in all cases, the system clock frequency (freq gclk1 ) can be reduced by the dfnh and dfnl bits in the sccr. notice that the maximum system clock frequency occurs when the dfnh bits are set to $0. when the modck2 bit is set, a 4mhz clock is supplied as oscclk, but when it is clear (0), the input frequency is either 32khz (modck1=0) or the maximum system frequency (modck1=1). the last case is 1:1 mode. table 5-2. reset clocks source configuration modck [1:2] por default mf + 1 at por pitrtclk division defaults at por tmbclk division defaults at por spll options 00 0 513 4 4 normal operation, pll enabled. main timing reference is freq (oscm) = 32 khz. 01 0 5 512 4 normal operation, pll enabled. main timing reference is freq (oscm) = 4 mhz. 11 0 5 512 4 normal operation, pll enabled. main timing reference is freq (extclk) = 4 mhz. 10 0 1 512 16 normal operation, pll enabled. 1:1 mode (freq clkout(max) = freq osc(extclk) ) 1 the configuration remains unchanged.
clocks and power control 5-6 mpc801 user? manual motorola 5 if extclk is the main timing reference (modck1=1 @por) and the oscillator is the timing reference to the real-time clock and periodic interrupt timer, the frequency of the oscillator connected to oscillator should be in the 32khz range. the tbs bit in the system clock and reset control register (sccr) can select the timebase clock to be either the spll input clock or gclk2. the periodic interrupt timer and real-time clock frequency and source are specified by the rtdiv and rtsel bits in the sccr. the values of the pitrtclk and tmbclk clock divisions can be changed by the software. the rtdiv bit value in the sccr defines the division of pitrtclk. all possible combinations of the tmbclk divisions are listed in table 5-3. note the voltage on the modck1 and modck2 pins should always be less than or equal to the vddh power supply voltage applied to the part. 5.2 on-chip oscillators and external clock input the oscillator uses either a 3mhz ? 5mhz (4mhz mode) or a 30khz ? 50khz (32khz mode) crystal to generate the pll reference clock. when the oscillator output is the timing reference to the system, pll skew elimination between the xtal, extal, and clkout pins is not guaranteed. note the internal frequency of the mpc801 and the output of the clko pins is dependent on the quality of the crystal circuit and multiplication factor used in the pllcr. please refer to the sections on phase-lock loop for a description of the pll performance. the external clock input receives a clock from an external source. the clock frequency can be either in the range of 3mhz ? 5mhz or it should be at the system frequency of at least 15mhz (1:1 mode). when the external clock input is the timing reference to the system, pll skew elimination between the extclk and clkout pins is less than 1ns. table 5-3. tmbclk divisions tbs bit in sccr modck1 at reset mf + 1 tmbclk division 116 0 0? 0 1 1, 2 16 01> 24
clocks and power control motorola mpc801 user? manual 5-7 5 for normal operation, at least one clock source should be active, but you can also configure both clock sources to be active. in this configuration, extclk provides the oscclk and oscillator provides the pitrtclk. the input of an unused timing reference should be grounded. 5.3 the system phase-locked loop the system pll performs frequency multiplication and skew elimination and allows the processor to operate at a high internal clock frequency using a low frequency clock input, which is a feature with two immediate benefits. lower frequency clock input reduces the overall electromagnetic interference generated by the system and oscillating at different frequencies reduces the cost by eliminating the need to add another oscillator to the system. the system pll block diagram is illustrated in figure 5-3. figure 5-3. system pll block diagram 5.3.1 multiplying the frequency the pll can multiply the input frequency by any integer between 1 and 4,096. the multiplication factor can be changed by changing the value of the mf bits in the pll low-power and reset control register. even though you can program any integer value from 1 to 4,096, the resulting vco output frequency must be in the range specified in section 20 electrical characteristics . as defined in table 5-5, the multiplication factor is set to a predetermined value during power-on reset. 5.3.2 eliminating skew the pll is capable of eliminating the skew between the external clock entering the core, the internal clock phases, and the clkout pin. therefore, the pll is useful for tightening synchronous timings. skew elimination is only active when the pll is enabled and programmed with a multiplication factor of 1 or 2 (mf=0 or 1) and the timing reference to the system pll is the external clock input extal. with pll disabled, the clock skew can be much larger. vddsyn / vsssyn phase comparator mult. factor mf[0:11] xfc oscclk up down vcoout feedback clock delay charge pump vco
clocks and power control 5-8 mpc801 user? manual motorola 5 5.3.3 operating the pll block the reference signal is sent to the phase comparator that controls the up and down direction of the charge pump driving the voltage across the external filter capacitor. the direction selected depends on whether the feedback signal phase lags or leads the reference signal. the output of the charge pump drives the vco whose output frequency is divided down and fed back to the phase comparator for comparison with oscclk. the mf values (0 to 4,095) are mapped to multiplication factors of 1 to 4,096. also, when the pll is operating in 1:1 mode, the multiplication factor is 1(mf=0) and the pll output frequency is twice the maximum system frequency. this double frequency is required to generate the gclk1 and gclk2 clocks. refer to the block diagram in figure 5-3 for details. on initial system power-up after keep alive power is lost, power-on reset should be asserted by the external logic for 3 microseconds after a valid level is reached on the kapwr supply. whenever power-on reset is asserted, the mf bits are set according to table 5-2 and the dfnh and dfnl bits in the sccr are set to the value of 0 ( ? 1), respectively. this value then programs the spll to generate the default system frequency of approximately 16.7mhz for a 32khz input frequency and 20mhz for a 4mhz input frequency. 5.4 the low-power divider the output of the pll is sent to a low-power divider block that generates all other clocks in normal operation, but divides the output frequency of the vco before it generates the syncclk, syncclks, brgclk, and general system clocks sent to the rest of the mpc801. gclk1c and gclk2c are the system timing references for the powerpc core as well as the instruction and data caches and memory management units. gclk1 and gclk2 are the system timing references for all other modules. gclk1_50 and gclk2_50 can operate at a frequency of half the gclk1 and gclk2 frequency. the frequency ratio between gclk1/2 and gclk1/2_50 is determined by the ebdf bit in the sccr. the purpose of the low-power divider block is to allow you to reduce and restore the operating frequencies of different sections of the mpc801 without losing the pll. using the low-power divider block, full chip operation can be obtained at a lower frequency. this feature is called slow-go or gear mode. the selection and speed of the slow-go mode can be changed at any time and the changes occur immediately. the low-power divider block is controlled in the sccr and its default state is to divide all clocks by one. so, for a 40mhz system, the syncclk, syncclks, brgclk, and general system clocks are each 40mhz.
clocks and power control motorola mpc801 user? manual 5-9 5 5.5 internal clock signals the internal logic of the mpc801 uses 9 internal clock signals: general system clocks?clk1c, gclk2c, gclk1, gclk2, gclk1_50, and gclk2_50 baud rate generator clock?rgclk synchronization clocks?yncclk and syncclks the mpc801 also generates an external clock signal called clkout. the pll synchronizes these clock signals to each other. 5.5.1 the general system clocks the general system clocks?clk1c, gclk2c, gclk1, gclk2, gclk1_50, and gclk2_50?re the basic clocks supplied to all modules and submodules on the mpc801. gclk1c and gclk2c are supplied to the powerpc core, data and instruction caches, and memory management units and they can be stopped when the core enters the doze low-power mode. gclk1 and gclk2 are supplied to the system interface unit, clock module, and communication modules. the external bus clock gclk2_50 is the same as clkout. the general system clock defaults to vco/2 = 40mhz, assuming a 40mhz system frequency. in slow-go mode, the frequency of the general system clock can be dynamically changed with the sccr. see figure 5-4 for details. figure 5-4. general system clocks select the general system clock frequency can be switched between different values. the highest operational frequency can be achieved when the system clock frequency is determined by dfnh and dfnh=0. the general system clock can be operated at a low or high frequency. low is defined by the dfnl bits of the sccr and high is defined by the dfnh bits. software can change the frequency of the general system clock on-the-fly. the general system clock can be forced to switch to its low frequency. however, in some applications, a high frequency is required during certain periods. for example, interrupt routines require a higher performance than a low frequency operation provides, but they consume less power than a maximum frequency operation provides. dfnh divider dfnl divider vco/2 (50 mhz) dfnh normal low power general system clock dfnl
clocks and power control 5-10 mpc801 user? manual motorola 5 the mpc801 is capable of automatically switching between low and high frequency operation whenever one of the following conditions exist: a pending interrupt from the interrupt controller occurs. this option is maskable by the prqen bit in the sccr. the pow bit in the core? machine state register is clear. this option is maskable by the prqen bit in the sccr. when none of these conditions exist and the csrc bit of the pll low-power reset control register is set, the general system clock automatically switches back to the low frequency. when the general system clock is divided, its duty-cycle is changed. one phase remains the same (12.5ns @ 40mhz) while the other becomes longer. notice that clkout no longer has a 50% duty cycle when the general system clock is divided. the clkout waveform is the same as that of gclk2_50. figure 5-5. divided system clocks timing diagram the frequency for system clocks gclk1and gclk2 is: the frequency for clocks gclk1_50 and gclk2_50 is: gclk1 divide by 1 gclk2 divide by 1 gclk1 divide by 2 gclk2 divide by 2 gclk1 divide by 4 gclk2 divide by 4 freqsys freqsysmax 2 dfnh () or 2 dfnl 1 + () ---------------------------------------------------------------------- - = freq50 freqsysmax 2 dfnh () or 2 dfnl 1 + () ---------------------------------------------------------------------- - 1 ebdf 1 + --------------------------- =
clocks and power control motorola mpc801 user? manual 5-11 5 figure 5-6. mpc801 clocks for dfnh = 1 or dfnl = 0 timing diagram 5.5.2 the baud rate generator clock the baud rate generator clock (brgclk ) is used by the communication modules and the memory controller refresh counter. it defaults to vco/2 = 40mhz, assuming a 40mhz system frequency. the purpose of brgclk is to allow the communication modules to continue operating at a fixed frequency, even when the rest of the mpc801 is operating at a reduced frequency. the baud rate generator clock frequency is: 5.5.3 the synchronization clocks the synchronization clock (syncclk) is used by the serial synchronization circuitry in the serial ports of the communication modules and includes the serial interface, serial communication controllers, and serial management controllers. it synchronizes externally generated clocks before they are used internally. syncclk defaults to vco/2 = 40mhz, assuming a 40mhz system frequency. the syncclk is used by the serial interface internal logic. gclk1 gclk2 gclk1_50 gclk2_50 clkout gclk1_50 gclk2_50 (ebdf=00) (ebdf=00) (ebdf=01) (ebdf=01) clkout (ebdf=00) (ebdf=01) freqbrg freqsysmax 2 2 dfbrg () ------------------------------------------ - =
clocks and power control 5-12 mpc801 user? manual motorola 5 the purpose of syncclk is to allow the communication modules to continue operating at a fixed frequency, even when the rest of the mpc801 is operating at a reduced frequency. thus, the syncclk allows you to maintain the serial synchronization circuitry at the preferred rate, while lowering the general system clock to the lowest possible rate. however, syncclk must always have a frequency at least as high as the general system clock frequency, be at least two times the preferred serial clock rate, and at least two and half times the preferred serial clock rate if the timeslot assigner in the serial interface is used. the sync clock frequency is: the clkout is the same as gclk2_50. it defaults to vco/2 = 40mhz, assuming a 40mhz system frequency. the sccr controls whether it drives full strength, half strength, or is disabled. disabling or decreasing the strength of clkout can reduce power consumption, noise, and electromagnetic interference on the printed circuit board. when the pll is acquiring lock, the clkout signal is disabled and remains in the low state. 5.6 the phase-locked loop pins the following pins are dedicated to pll operation. note the internal frequency of the mpc801 and the output of the clko pins is dependent on the quality of the crystal circuit and the mf bits of the plprcr. please refer to the sections on phase-lock loop for details about pll performance. vddsyn?rain voltage the vdd pin is dedicated to analog pll circuits. the voltage should be well-regulated and the pin should be provided with an extremely low-impedance path to the vdd power rail. vddsyn should be bypassed to vsssyn by a 0.1 m f capacitor located as close as possible to the chip package. vsssyn?ource voltage the vss pin is dedicated to analog pll circuits. it should be provided with an extremely low impedance path to ground and bypassed to vddsyn by a 0.1 m f capacitor located as close as possible to the chip package. it is recommended that you also bypass vsssyn to vddsyn with a 0.01uf capacitor as close as possible to the chip package. vsssyn1?ource voltage 1 the vss pin is dedicated to the analog pll circuits. it should be provided with an extremely low-impedance path to ground. freqsync freqsysmax 2 2 dfsync () ---------------------------------------------- - =
clocks and power control motorola mpc801 user? manual 5-13 5 xfc?xternal filter capacitor this pin connects to the off-chip capacitor for the pll filter. one terminal of the capacitor is connected to xfc and the other is connected to vddsyn. note 30m w is the minimum parasitic resistance value that ensures proper pll operation when connected in parallel with the xfc capacitor. 5.7 controlling the system clock the system phase-loop lock has a 32-bit control register that is powered by keep alive power. this system clock and reset control register (sccr) is memory-mapped into the mpc801 system interface unit register map. bits 0, 3?, and 9?eserved these bits are reserved and should be set to 0. com?lock output mode these bits control the output buffer strength of the clkout pin. when both bits are set, the clkout pin is held in the high (1) state. these bits can be dynamically changed without generating spikes on the clkout pin. if the clkout pin is not connected to external circuits, both bits (disabling clkout) should be set to minimize noise and power dissipation. the com bits are cleared by a hard reset. 00 = clock output enabled full-strength output buffer. 01 = clock output enabled half-strength output buffer. 10 = reserved. 11 = clock output disabled. table 5-4. xfc capacitor values minimum capacitance maximum capacitance unit mf < = 4 xfc = mf * 425 - 125 xfc = mf * 590 - 175 pf mf > 4 xfc = mf * 520 xfc = mf * 920 pf sccr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field res com reserved tbs rtdiv rtsel res prqen reserved ebdf res bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field res dfsync dfbrg dfnl dfnh reserved
clocks and power control 5-14 mpc801 user? manual motorola 5 tbs?imebase source this bit determines the clock source that drives the timebase and decrementer. 0 = tb frequency source is the crystal oscillator frequency divided by 4 or 16. 1 = tb frequency source is the system clock divided by 16. rtdiv?eal-time clock divide this bit indicates if the clock to the real-time clock and periodic interrupt timer is additionally divided by 128. at power-on reset this bit is cleared if both modck[1] and modck[2] are zeros. otherwise, it is set. 0 = the real-time clock and periodic interrupt timer are divided by 4. 1 = the real-time clock and periodic interrupt timer are divided by 512. rtsel?eal-time clock circuit input source select this bit specifies the input source to the real-time clock. at power-on reset, this bit receives the value of the modck[1] bit. 0 = the real-time clock and periodic interrupt timer are divided by 4. 1 = the real-time clock and periodic interrupt timer are divided by 512. prqen?ower management request enable this bit specifies whether or not the general system clock returns to the high frequency defined by dfnh while there is a pending interrupt from the interrupt controller or pow bit in the machine state register is clear. this bit is cleared by power-on or hard reset. 0 = the system remains in the lower frequency defined by dfnl even if there is a pending interrupt from the interrupt controller or pow bit in the machine state register is cleared. 1 = the system switches to high frequency defined by dfnh when there is a pending interrupt from the interrupt controller or pow bit in the machine state register is cleared. bits 11?2 and 15?6?eserved these bits are reserved and should be set to 0. ebdf?xternal bus division factor these bits define the frequency division factor between gclk1/gclk2 and gclk1_50/ gclk2_50. clkout is similar to gclk2_50. the gclk2_50 and gclk1_50 are used by the external master, bus interface, and memory controller to interface with the external system. these bits are initialized during hreset using the hard reset configuration mechanism. 00 = clkout is gclk2 divided by 1. 01 = clkout is gclk2 divided by 2. 1x = reserved.
clocks and power control motorola mpc801 user? manual 5-15 5 dfsync?ivision factor for the syncclk these bits define the syncclk and syncclks frequencies. changing the value of these bits does not result in a loss-of-lock condition. these bits are cleared by the power-on or hard reset. 00 = divide by 1 (normal operation). 01 = divide by 4. 10 = divide by 16. 11 = divide by 64. dfbrg?ivision factor for the brgclk these bits define the brgclk frequency. changing the value of these bits does not result in a loss-of-lock condition. these bits are cleared by the power-on or hard reset. 00 = divide by 1 (normal operation). 01 = divide by 4. 10 = divide by 16. 11 = divide by 64. dfnl?ivision factor lowest frequency these bits are required for two reasons?o reduce the general system clock to a frequency lower than that which can be obtained in the dfnh bits and to automatically switch between the dfnl and dfnh rates. these bits are cleared by the power-on or hard reset. these bits can be loaded with the preferred divide value and the csrc bit must be set to change the frequency. changing the value of these bits does not result in a loss-of-lock condition. these bits are cleared by system reset. 000 = divide by 2. 001 = divide by 4. 010 = divide by 8. 011 = divide by 16. 100 = divide by 32. 101 = divide by 64. 110 = reserved. 111 = divide by 256.
clocks and power control 5-16 mpc801 user? manual motorola 5 dfnh?ivision factor high frequency changing the value of these bits does not result in a loss-of-lock condition. these bits are cleared by power-on or hard reset. these bits can be loaded at any time to change the general system clock rate. 000 = divide by 1. 001 = divide by 2. 010 = divide by 4. 011 = divide by 8. 100 = divide by 16. 101 = divide by 32. 110 = divide by 64. 111 = reserved. bits 27?1?eserved these bits are reserved and should be set to 0. 5.8 pll low-power and reset control register the 32-bit pll low-power and reset control register (plprcr) is powered by a keep alive power supply. this register is memory-mapped into the mpc801 serial interface unit register map. mf?ultiplication factor the output of the voltage control oscillator (vco) is divided to generate the feedback signal that goes to the phase comparator. the mf bits control the value of the divider in the spll feedback loop. the phase comparator determines the phase shift between the feedback signal and the reference clock. this difference results in an increase or decrease in the vco output frequency. the mf bits can be read and written at any time. changing the mf bits causes the spll to lose lock. all clocks are disabled until pll reaches lock condition. the normal reset value for the dfnh bits is $0 or divided by one. when the pll is operating in 1:1 mode, the multiplication factor is set to 1 (mf=0). see table 5-2 for details. splss?ystem pll lock status sticky this bit is not affected by hard reset. an out-of-lock indication sets the splss bit and it remains set until the software clears it. at power-on reset, the state of the splss bit is zero. plprcr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field mf reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field splss texps res tmist res csrc lpm csr lolre fiopd reserved
clocks and power control motorola mpc801 user? manual 5-17 5 the splss bit is negated by writing a 1 (writing a zero has no effect). the splss bit is not affected by zero because of a software-initiated loss of lock, which is defined as an multiplication factor change or entering deep sleep and power-down modes. 0 = spll has remained in lock. 1 = spll has gone out of lock at least once, but not because of a change with the pllen or mf bits. texps?imer expired status this bit is set by a reset. if it is enabled, texps is asserted when the periodic timer expires, the real-time clock alarm sets, timebase clock alarm is set, or the decrementer interrupt occurs. the bit stays set until the software clears it. texps is negated by writing a 1 (writing a zero has no effect). when texps is set, the texp external signal is asserted and when it is reset, the texp external signal is negated. 0 = texp is negated. 1 = texp is asserted. tmist?imers interrupt status this bit is cleared at reset and is set when either the real-time clock, periodic interrupt timer, timebase, or decrementer interrupt occurs. it is cleared by writing a 1 (writing a zero has no effect). the system clock frequency remains at a high frequency value defined by the dfnh bits if the tmist bit is set. the clock frequency remains high if the csrc bit in the plprcr is set and there are no conditions for switching to normal low mode. 0 = no timer expiration event is detected. 1 = a timer expiration event is detected. csrc?lock source this bit specifies the bit that determines the general system clock?fnh or dfnl. setting this bit switches the general system clock to the dfnl value needed to enter slow-go low-power mode. clearing this bit switches the general system clock to the dfnh value. csrc is cleared at hard reset. 0 = general system clock is determined by the dfnh value 1 = general system clock is determined by the dfnl value lpm?ow-power modes these bits are encoded to provide one normal operating mode and four low-power modes. in normal and doze modes, the system can be in the high state defined by the dfnh bits or in the low state defined by the dfnl bits. the normal high operating mode is the state out of reset. this is also the state the bits defer to when the low-power mode exit signal arrives. in addition, there are four low-power modes?oze, sleep, deep sleep, and power-down. table 5-5 provides more details on these bits.
clocks and power control 5-18 mpc801 user? manual motorola 5 table 5-5 describes all possible transfers between low-power modes. the mpc801 enters a low-power mode by setting the lpm bits appropriately. this can only be done in one of the normal modes and not in the doze mode. exiting from low-power modes occurs through an asynchronous or synchronous interrupt. an enabled asynchronous interrupt clears the lpm bits, but does not change the plprcr csrc bit. the asynchronous interrupt is responsible for exiting from normal, low doze high, low, and sleep modes to normal high mode. the asynchronous interrupt sources are: asynchronous wake-up interrupt from the interrupt controller real-time clock, periodic interrupt timer, timebase, or decrementer interrupts (if enabled) table 5-5. mpc801 low-power modes operation mode spll clocks wake-up method return time from wake-up event to normal high mpc801 power consumption at 50mhz functionality normal high lpm=00 active full freq. div 2 dfnh 20 mwatt+ 1/2 dfnh watt full functions not in use are shut off normal low (?ear? lpm=00 active full freq. div 2 dfnl+1 software or interrupt asynchronous interrupts: 3-4 maximum system cycles synchronous interrupts: 3-4 actual system cycles 20 mwatt+ 1/2 (dfnl+1) watt doze high lpm=01 active full freq. div 2 dfnh interrupt 20mwatt+ 0.4/2 dfnh watt enabled: rtc, pit, and memc, disabled: extended core doze low lpm=01 active full freq. div 2 dfnl+1 interrupt 20 mwatt+ 0.4/2 (dfnl+1) watt sleep lpm=10 active not active interrupt 3-4 maximum system clocks <10 mw enabled: rtc, pit, tb, and dec deep sleep lpm=11 texps=1 not active not active interrupt <500 oscillator cycles 16 msec-32 khz 125 m sec-4 mhz tbd power-down lpm=11 texps=0 not active not active interrupt <500 oscillator cycles + power supply wake-up (pwsp_wake+ 16 msec) @ 32 khz 32 khz- ~10 m a, kapwr = 3.0 v temperature=50 c
clocks and power control motorola mpc801 user? manual 5-19 5 figure 5-7. mpc801 low-power modes flowchart normal high mode lpm=00 csrc=0/1 normal low lpm=00, csrc=1 doze low lpm=01, csrc=1 doze high lpm=01, csrc=0/1 sleep mode lpm=10, csrc=0 deep sleep mode lpm=11, csrc=0, power down mode lpm=11, csrc=0, interrupt software * software * software * software * software * async. wake-up or real-time clock, or decrementer i interrupt walk-up: 500 input frequency clocks wake-up: 3-4 sysfreq clocks * software is active only in normal high/low modes software * real-time clock, periodic interrupt hard reset asynchronous wake-up: 3-4 sysfreqmax interrupts clocks texps=1 texps=0** ** texps receives the zero value by writing one. writing a zero has no effect on texps. by external hard reset software * *** the switch from normal high to normal low is enabled only if the conditions to asynchronous interrupt are cleared or external hard reset periodic interrupt timer, timebase, timer, timebase, or decrementer interrupt followed
clocks and power control 5-20 mpc801 user? manual motorola 5 the system responds quickly to an asynchronous interrupt. the wake-up time from normal low, doze high/low, and sleep mode due to an asynchronous interrupt is only 3 to 4 clocks of maximum system frequency. in a 40mhz system, this wake-up takes 75ns to 100ns. the asynchronous wake-up interrupt from the interrupt controller is level sensitive. therefore, it is negated only after the cause of the interrupt in the interrupt controller is cleared. the real-time clock, periodic interrupt timer, timebase, or decrementer interrupts set status bits in the plprcr. the clock module views this interrupt as a pending asynchronous interrupt as long as the tmist bit is set. therefore, the tmist status bit should be cleared before entering any low-power mode other than normal high mode. the wake-up time due to synchronous interrupt sources from the interrupt controller is measured in actual system clocks. it takes 2 to 4 system clocks from the interrupt event before the system reaches normal high mode. in a 50mhz system where dfnl=111 (divided by 256), the wake-up time is 12.8 to 25.6 m s. in normal and doze modes, if the plprcr csrc bit is set, the system toggles between low frequency (defined by the dfnl bit) and high frequency (defined by dfnl/dfnh) states. the conditions to switch from normal low mode to normal high state are: a pending interrupt from an interrupt controller must occur the pow bit in the machine state register must be cleared (normal mode) if none of these conditions exist, the plprcr csrc bit is set, the asynchronous interrupt status bits are reset, and the system switches back to normal low mode. a pending interrupt from the interrupt controller transfers the system from doze mode to normal high mode. an exit from deep sleep mode is caused by: an asynchronous wake-up interrupt from the interrupt controller real-time clock, periodic interrupt timer, timebase, or decrementer interrupts (if enabled) in deep sleep mode, the pll is disabled and the wake-up time from this mode is a maximum of 500 pll input frequency clocks. in 1:1 mode the wake-up time can be up to 1,000 pll input frequency clocks. if the pll input frequency is 32khz the wake-up time is less than 15.6ms and if it is 4mhz the wake-up time is less then 125 m s. an exit from power-down mode is accomplished with a hard reset that should be asserted by external logic in response to the texps bit and texp pin assertion. the texps bit is asserted by an enabled real-time clock, periodic interrupt timer, timebase, or decrementer interrupt. the hard reset takes longer than the time it takes the power supply to wake up, in addition to the time it takes the pll to lock. hard reset assertion when the texps bit and texp pin are clear, sets the bit and the pin values, thus causing an exit from power-down low-power mode. for more details on power-down mode, refer to section 5.10.1 configuration .
clocks and power control motorola mpc801 user? manual 5-21 5 note the chip is only allowed to enter deep sleep low-power mode and power-down mode if the main timing reference is a 32khz crystal oscillator. csr?heckstop reset enable if this bit is set, an automatic reset is generated when the core signals that it has entered checkstop mode, unless debug mode is enabled at reset. if the bit is clear and debug mode is not enabled, then the system interface unit does nothing when a checkstop signal is received from the core. however, if debug mode is enabled, then the part enters debug mode when entering checkstop mode. in this case, the core does not assert the checkstop signal to the reset circuitry. 0 = the checkstop condition does not cause automatic reset. 1 = the checkstop condition causes automatic reset. lolre?oss of lock reset enable this bit specifies the manner in which the clocks handle a loss of lock indication. when this bit is clear, a hard reset is not asserted if a loss of lock indication occurs. however, when it is set, a hard reset is asserted when a loss-of-lock indication occurs. 0 = loss of lock does not cause reset. 1 = loss of lock causes reset. fiopd?orce i/o pull down this bit indicates whether the address and data external pins are driven by an internal pull-down device at sleep and deep sleep low-power modes. when this bit is set and the chip is either in sleep or deep sleep low-power mode, the a and d external pins are driven to zero. when this bit is set and the chip is not in sleep or deep sleep low-power modes (or when fiopd is cleared), the a and d external pins are unaffected. 0 = the address and data pins are not driven by an internal pull-down device. 1 = the address and data pins are driven by an internal pull-down device.
clocks and power control 5-22 mpc801 user? manual motorola 5 5.9 basic power structure the mpc801 provides a wide range of possibilities for power supply connection. figure 5-9 illustrates the different power supply sources for each one of the basic units on the chip. for more details about the relationships between the power supplies, refer to section 5.1 the clock module . the i/o buffers, logic, and clock block are fed by a 3.3v power supply that allows them to function in a ttl-compatible range of voltages. the internal logic can be fed by a 3.3 or 2v source allowing a considerable reduction in power consumption. the pll is fed by a 3.3v power supply (vddsyn) to achieve a high stability in its output frequency. the oscillator, real-time clock, periodic interrupt timer, timebase, or decrementer are all fed by the kapwr rail, thus allowing the external power supply unit to disconnect all other subunits at low-power deep sleep mode. the texp pin (fed by the same rail) can switch between sources using the external power supply unit. figure 5-8. mpc801 basic power supply configuration clock control pll periodic interrupt internal logic vddh i / o vddl vddsyn kapwr texp oscillator, timer, timebase, real-time clock, and decrementer
clocks and power control motorola mpc801 user? manual 5-23 5 5.10 keep alive power 5.10.1 configuration an example of a switching scheme for an optimized low-power system is illustrated in figure 5-9. figure 5-9. external power supply scheme (2.0 v internal voltage) sw1 and sw2 can be unified in one switch if vddsyn and vddh are supplied by the same source. if vddl is fed with 3.3v, sw2 and sw3 can be combined into one switch. the texp signal, if enabled, is asserted by the mpc801 when the real-time clock or timebase time value matches the value programmed in its associated alarm register or when the periodic interrupt timer or decrementer decrements their value to zero. the texp signal is negated when writing to the texps status bit with the corresponding data bit being 1. the kapwr power supply feeds the oscillator. the condition for main crystal oscillator stability is that the power supply value changes slowly. the maximum slope of the kapwr power supply should be less than 1.7v/ms for a 32khz input frequency. an exponential model of voltage change on the kapwr rail should ensure that t > 20/freq oscm . main power backup vddsyn 3.3 v 2.0 v vddh vddl kapwr supply mpc801 switch logic texp 2.4-3.3v sw1 sw2 power supply sw3
clocks and power control 5-24 mpc801 user? manual motorola 5 5.10.2 the key mechanism all the registers defined in the system integration, decrementer, timebase timers, and the clocks and reset of table 3-1 are powered by the kapwr supply. when power-down mode is entered, the value stored in these registers is preserved when the main power supply is disconnected. if this requirement is not met, data loss can occur in these registers. to reduce the possibility of data loss, the mpc801 includes a key mechanism that ensures data retention on locked registers. while a register is locked, all writes are ignored and a machine check exception is generated. each of the registers in the kapwr region has a key that can be in an open or locked state. at power-on reset, all keys are in the open state, except for the real-time clock registers. each key also has an address in the internal memory map. a 0x55ccaa33 write to this location changes the key to the open state. writing any other data to this location changes the key to the locked state. figure 5-10. key mechanism diagram the key registers for the system integration timer and the clock and reset registers are defined in table 3-1. open locked write to the key0x55ccaa33 write to the key other value power-on reset
motorola mpc801 user? manual 6-1 6 section 6 the powerpc core the core is the module of the mpc801 where the powerpc architecture is implemented. it has the functionality of the powerpc branch and fixed-point processors, in addition to all the powerpc user mode instructions (with the exception of the floating-point instructions) and all the registers associated with them. it also contains part of the development support features of the mpc801, including breakpoint and watchpoint support, program flow tracking data generation, and debug mode operation in which the chip is controlled by the development support system through the debug port module. this section describes the functional specifications of the core. it is based on a document called the powerpc family: the programming environment (mpcfpe/d) that explains the architecture of the powerpc in great detail. note as needed, this manual only contains references to those documents and does not duplicate any information already specified there. 6.1 features the following list provides the main features of the mpc801 core: 32-bit powerpc architecture single-issue integer machine variable pipeline depth architecture tailored to instruction complexity out-of-order execution termination branch prediction for prefetch 32 32 bit general-purpose register file precise exception model extensive debug/testing support
the powerpc core 6-2 mpc801 user? manual motorola 6 6.1.1 basic structure of the core to accomplish its tasks, the core is divided into the following subunits: sequencer unit ?onsists of the branch processor, the instruction prefetch queue, and the interrupt handling mechanism. it controls some data structures within the register unit. register unit ?onsists of all the user-visible registers, the register? scoreboard mechanism, and a history of previous operations to allow for a precise interrupt model. this module is physically split so that each data structure is implemented near the area where it is used. fixed-point unit ?onsists of all fixed-point instruction implementations, except load/ store. this module is subdivided into the following two execution units: imul/idiv?ixed-point multiply and divide instruction implementations alu/bfu?ixed-point logic, add, and subtract instruction implementations, as well as the bit field instructions. load/store unit ?onsists of all load and store instructions, except floating-point processor load and store. 6.1.2 instruction flow within the core when fetched, instructions enter the instruction queue, thus enabling branch folding by allowing out-of-order branch execution. nonbranch instructions reaching the top of the instruction queue are issued to the execution units. instructions can be flushed from the instruction queue when an exception on a previous instruction, interrupt, or miss-predicted fetch occurs. all instructions, including branches, enter the history buffer along with processor state information that can be affected by the instruction? execution. this information is used to enable out-of-order completion of instructions together with precise exception handling. when exceptions or interrupts occur, instructions can be flushed or recovered from the machine. the instruction queue is always flushed when the history buffer is recovered. an instruction retires from the machine after it finishes executing without exception and all preceding instructions are retired from the machine. figure 6-1 illustrates the core? microarchitecture.
the powerpc core motorola mpc801 user? manual 6-3 6 figure 6-1. core block diagram figure 6-2. instruction flow conceptual diagram writeback bus source buses control bus branch l-addr l-data ldst fix ldst addr imul / idiv alu / gpr history gpr (32 x 32) contr regs (2 slots / clock) (4 slots / clock) instruction queue unit next address generation sequencer core bfu instruction cache /instruction mmu interface data cache / data mmu interface data execution units history buffer instruction queue branch unit issue retire fetch writeback
the powerpc core 6-4 mpc801 user? manual motorola 6 6.1.3 basic instruction pipeline figure 6-3 illustrates basic instruction pipeline timing. figure 6-3. basic instruction pipeline timing diagram 6.2 the sequencer unit the instruction sequencer is the heart of the core. it centrally controls the data flow between execution units and register files. the sequencer implements the basic instruction pipeline, fetches instructions from the memory system, issues them to available execution units, and maintains a state history so it can back up the machine if an exception occurs. in addition, the sequencer unit implements all branch processor instructions, including flow control and condition register instructions. the sequencer data path is illustrated in figure 6-4. 6.2.1 flow control flow control operations are expensive to execute because they disrupt normal instruction pipeline flow. a change in program flow creates bubbles in the pipeline because of the time it takes to fetch the newly targeted instruction stream. in typical code, with 4 or 5 sequential instructions between branches, the machine could waste up to 25% of its execution bandwidth waiting on branch latency. fetch decode read + execute writeback l address drive l data load writeback branch decode branch execute i1 i3 i2 i1 i2 i1 i2 i1 i2 i1 i1 i1 i1 load store
the powerpc core motorola mpc801 user? manual 6-5 6 figure 6-4. sequencer data path to execute branches in parallel with the execution of sequential instructions, the sequencer maintains an instruction prefetch queue that is four instructions deep. in an ideal situation, a sequential instruction would be issued every clock, even when branches are present in the code. this is referred to as branch folding. the instruction prefetch queue also eliminates stalls caused by long latency instruction fetches and all instructions are fetched into the instruction prefetch queue, but only sequential instructions are issued to the execution units when they reach the head of the queue. the reason branches enter the queue is for watchpoint marking (refer to section 18 development support for details). since branches do not prevent the issue of sequential instructions unless they come in pairs, the performance impact of entering branches in the instruction prefetch queue is negligible. in addition to branch folding, the core implements a branch reservation station and static branch prediction so branches can issue as early as possible. the reservation station allows a branch instruction to issue even before its condition is ready. with the branch issued and out of the way, instruction prefetch can continue while the branch operand is being computed and the condition evaluated. static branch prediction determines the instruction stream to be prefetched while the branch is being resolved. when the branch operand becomes available, it is forwarded to the branch unit and the condition is evaluated. instruction address generator cc unit 32 instruction buffer 32 instruction prefetch queue (4) 32 branch condition evaluation execution units and registers files instruction memory system read / write buses
the powerpc core 6-6 mpc801 user? manual motorola 6 branch instructions whose condition is unavailable and forced to issue to the reservation station are predicted and these branches, which later turn out to have followed the wrong path, are mispredicted. branch instructions that issue with source data already available are unpredicted and those instructions fetched under a predicted branch are fetched conditionally. the core ignores conditionally prefetched instructions fetched under a mispredicted branch. 6.2.2 issuing instructions the sequencer attempts to issue a sequential instruction on each clock whenever possible. however, for an instruction to issue, the execution unit must be available and the required source data is available and no other executing instruction targets the same destination register. the sequencer informs the execution units of the instruction? existence on the instruction bus. the execution units then decode the instruction, interrogate the register unit, and inform the sequencer that it accepts the instruction for execution. 6.2.3 interrupts the core interrupts can be generated when an exception occurs. an exception results when an instruction is executed or an asynchronous external event occurs. there are five exception sources in the mpc801: external interrupt request certain memory access conditions internal errors, such as an attempt to execute an unimplemented opcode or floating-point arithmetic overflow trap instructions internal exceptions table 6-1. branch prediction policy branch type default prediction (y=0) modified prediction (y=1) bc with negative offset taken fall through bc with positive offset fall through taken bclr or bcctr (lk or ctr) address ready fall through taken bclr or bcctr (lk or ctr) address not ready wait wait b (unconditional branch) taken taken
the powerpc core motorola mpc801 user? manual 6-7 6 interrupt handling is transparent to user mode code. the core uses the same mechanism to handle all types of exceptions. when a user mode instruction experiences an exception, the machine is placed into privileged state and control is transferred to a software exception handler routine located at some offset within a memory-based vector table. each interrupt generated in the machine transfers control to a different address in the vector table. for more information on initializing the base address of the vector table, refer to table 6-13 as well as the powerpc definition of the machine state register. when the exception has been handled, the handler can resume execution of the user program without the knowledge that such an event ever occurred. as specified in powerpc family: the programming environment , the core implements a precise interrupt model. an interrupt usually occurs under one of the following conditions: no instruction that logically follows the faulting instruction in the code stream has started executing. all instructions preceding the faulting instruction have completed with respect to the executing processor. the precise location (address) of the faulting instruction is known to the exception handler. the instruction causing the exception may not have started executing (?efore interrupt?, could be partially completed, or has completed (?fter interrupt? depending on the interrupt and instruction types. see table 6-2 for details. in any case, a partially completed instruction is restartable and can be reexecuted after the interrupt is handled. this precise exception model can simplify and speed up exception processing because the software does not have to manually save the machine? internal pipeline states, unwind the pipelines, or cleanly terminate the faulting instruction stream. nor does it have to reverse the process to resume execution of the faulting stream.
the powerpc core 6-8 mpc801 user? manual motorola 6 6.2.4 precise exception model implementation to achieve maximum performance, many pieces of the instruction stream are concurrently processed by the core, regardless of the sequence specified by the executing program. instructions execute in parallel and are completed out of order. the hardware works hard to ensure that this out-of-order operation never has any effect besides the one specified by the program. this is most difficult to safeguard when an interrupt occurs after instructions that logically follow the faulting instruction or have already completed. at the time of an interrupt, the machine state becomes visible to other processes and, therefore, must be in the appropriate architecturally specified condition. the core takes care of this in the hardware by automatically backing up the machine to the instruction that caused the interrupt. by doing it, the core implements a precise exception model. this is, of course, assuming the instruction that caused the exception has not already begun when the interrupt occurs. to recover from an interrupt, a history buffer is used. this buffer is a fifo queue that records the relevant machine state at the time of each instruction issue. when issued, instructions are placed on the tail of the queue and they percolate to the head of the queue while they are executing. instructions remain in the queue until they finish executing and all preceding instructions have completed to a point where no exception can be generated. in the core, such a condition is fulfilled by waiting for full completion. in the event of an exception, the machine state necessary to recover the architectural state is available. as instructions finish executing, they are released (retired) from the queue and the buffer storage is reclaimed for new instructions entering the queue. table 6-2. ?efore?and ?fter?interrupts interrupt type instruction type before / after contents of srr0 hard reset any na undefined system reset any before next instruction to execute machine check interrupt any before faulting instruction implementation specific instruction / data tlb miss / error interrupts any before faulting fetch or load/store other asynchronous interrupts (noninstruction related interrupts) any before next instruction to execute alignment interrupt load / store before faulting instruction privileged instruction any privileged instruction before faulting instruction trap tw, twi before faulting instruction system call interrupt sc after next instruction to execute trace any after next instruction to execute debug i- breakpoint any before faulting instruction debug l- breakpoint load / store after faulting instruction + 4 implementation dependent software emulation interrupt na before faulting instruction floating point unavailable floating point before faulting instruction
the powerpc core motorola mpc801 user? manual 6-9 6 an exception can be detected at any time during instruction execution and is recorded in the history buffer when the instruction finishes execution. the exception is not recognized until the faulting instruction reaches the head of the history queue, but once the exception is recognized, an interrupt process begins. the queue is reversed and the machine is restored to its state at the time the instruction is issued. machine state is restored at a maximum rate of two floating-point and two fixed-point instructions per clock. figure 6-5. history buffer queue to correctly restore the architectural state, the history buffer must record the value of the destination prior to instruction execution. the destination of a store instruction, however, is in memory and it is not practical, from a performance standpoint, to always read memory before writing it. therefore, stores issue immediately to store buffers, but do not update memory until all previous instructions have completed execution without exception (the store has reached the head of the history buffer). the history buffer has enough storage to hold six instructions worth of state, but no more than four fixed-point instructions. the other two instructions can be condition code or branch instructions. in the event of a long latency instruction, it is possible (if a data dependency does not occur first) for issued instructions to fill up the history buffer. if so, instruction issue waits until the long latency operation (blocking retirement) finishes. the following types of instructions can potentially cause the history buffer to fill up: floating-point arithmetic instructions integer divide instructions instructions that affect/use resources external to the core queue tail queue head history buffer queue issued completed instructions writeback retired instructions instructions
the powerpc core 6-10 mpc801 user? manual motorola 6 6.2.4.1 restartability after an interrupt most interrupts in the core are restartable, but some are nonrestartable if they are only recognized when the machine status save/restore 0 and 1 registers (srr0 and srr1) are busy. system reset and machine check interrupts are the only interrupts that can be nonrestartable within the powerpc architecture. most of the interrupt types defined in the architecture should be restartable. it is assured by convention that no interrupt generating instruction should be executed between the start of an interrupt handler and the save of the registers altered by any interrupt or between the restoration of these registers and the execution of the rfi instruction. these are the srr0 and srr1 registers and for some interrupt types, the data address register (dar) and the data storage interrupt status register (dsisr). also, external interrupts are masked in these areas. in the core, two implementation specific interrupt types can have this phenomena?ebug port unmaskable interrupt and breakpoint interrupt. since there might be a situation in which it is preferable to be restartable, a mechanism is defined to notify the interrupt handler code when it is in a restartable state. the mechanism uses a bit within the machine state register (msr) called the recoverable interrupt bit (msr ri ). the msr ri shadow bit in the srr1 register indicates if the interrupt is restartable or not. notice that this bit does not need to be checked on interrupt types that are restartable by convention, except those mentioned above. the msr ri bit follows a similar behavior as the external interrupt enable bit (msr ee ). every time an interrupt occurs, msr ri is copied to its shadow in the srr1 register and cleared. every time an rfi instruction is executed, msr ri is copied from its shadow in the srr1 register. in addition, it can be altered by the software via the mtmsr (move to special register) instruction. the msr ri bit is intended to be set by the interrupt handler software after saving the machine state, and cleared by the interrupt handler software before retrieving the machine state. in critical code sections where msr ee is negated, but the srr0 and srr1 registers are not busy, msr ri should be left asserted. in these cases, if an interrupt occurs, it is restartable. to facilitate the software manipulation of the msr ri and msr ee bits, the core includes special commands implemented as move to special register. the following table defines these special register mnemonics. a write ( mtspr ) of any data to these locations performs the operation specified in the following table. any read ( mfspr ) from these locations is treated like any other unimplemented instruction and, therefore, results in an implementation dependent software emulation interrupt. for specific encoding, see table 6-3.
the powerpc core motorola mpc801 user? manual 6-11 6 6.2.5 processing an interrupt the following table shows the significant events that occur when an interrupt is processed. table 6-3. special ports to the machine state register bits mnemonic msr ee msr ri used for eie 1 1 external interrupt enable: end of interrupt handler? prologue, enable nested external interrupts; end of critical code segment in which external interrupts were disabled eid 0 1 external interrupt disable, but other interrupts are recoverable: end of interrupt handler? prologue, keep external nested interrupts disabled; start of critical code segment in which external interrupts are disabled nri 0 0 nonrecoverable interrupt: start of interrupt handler? epilogue table 6-4. interrupt latency time point fetch issue instruction complete kill pipeline a faulting instruction issue b instruction complete and all previous instructions complete c start fetch handler kill pipeline d b + 3 clocks e first instruction of handler issued notes: 1. at time point a an instruction is issued that is destined to cause an interrupt. 2. at time point b the excepting instruction has reached the head of the history queue, thus implying that all instructions preceding it in the code stream have ?ished execution without generating an interrupt. also, the excepting instruction itself has completed execution. at this time the exception is ?ecognized and exception processing begins. if, at this point, the instruction had not generated an exception, it would have been retired. 3. at time point c the sequencer starts to fetch the interrupt handlers ?st instruction. 4. by time point d the state of the machine prior to the issue of the excepting instruction is restored (the machine is restored to its state at the time. 5. at time point e the msr and instruction pointer of the executing process have been saved and control has been transferred to the interrupt handler routine.
the powerpc core 6-12 mpc801 user? manual motorola 6 at time point a the excepting instruction issues and begins executing. during the interval between a and b, previously issued instructions are finishing execution. this interval is equivalent to the time required for all instructions currently in progress to complete. at time point b, the exception is recognized and during the interval between b and d the machine state is being restored. this time is a maximum of 10 cycles. at time point c, the core starts fetching the first instruction of the exception handler if the interrupt handler is external. it is 5 cycles if it is in the instruction cache and no show mode is on. at time point d all state has been restored and during the interval between d and e, the machine is saving context information in srr0 and srr1, disabling interrupts, placing the machine in privileged mode, and fetching the first instructions of the interrupt handler from the vector table. the interval between d and e requires a minimum of one clock. the interval between c and e depends on the memory system and is the time it takes to fetch the first instruction of the interrupt handler. for full history buffer restore time it is no less then two clocks. 6.2.6 serialization the core has multiple execution units, each of which can be executing different instructions at the same time. this is normally transparent to the your program, but in some special circumstances (debugging, i/o control, multiprocessor synchronization) it might become necessary to force the machine to serialize. there are two possible serialization actions defined for the core: execution serialization?nstruction issue is halted until all instructions currently in progress have completed execution. all internal pipeline stages and instruction buffers have emptied and all outstanding memory transactions are completed. fetch serialization?nstruction fetch is halted until all instructions currently in the processor have completed execution. the machine after fetch serialization is completely synchronized. an attempt to issue a serializing instruction causes the machine to serialize before the instruction issues. for more information on instruction execution timing, see table 8-1. only the sync (synchronize) instruction guarantees serialization across powerpc implementations. fetching an isync (storage control) instruction causes fetch serialization. also, when the serialize mode bit (ctrl ser ) is asserted or in debug mode, any instruction can cause fetch serialization. 6.2.6.1 serialization latency the time required to serialize the machine is also the amount of time needed to complete the instructions currently in progress. this time is heavily dependent on the instructions in progress and the memory system latency. it is impossible to put an absolute upper bound on this time because the memory system design is not controlled by the core. the time to complete the current instruction is generally the machine serialization time and the specific instruction execution time determines how long serialization takes. this can be either divide, load, or store a multiple, string, or pair of simple load/store instructions. see table 8-1 for more information.
the powerpc core motorola mpc801 user? manual 6-13 6 6.2.7 the external interrupt the core provides one external interrupt line?he architectural maskable external interrupt. in the mpc801, this interrupt is generated by the on-chip interrupt controller. it is software acknowledged and maskable by the msr ee bit, which is automatically cleared by the hardware to disable external interrupts when any interrupt is taken. 6.2.7.1 latency when an external interrupt is detected, every instruction that can retire from the history buffer does so and the interrupt is assigned to the instruction at the head of the history buffer. however, the following conditions must be met before the instructions at the head of the queue can retire. the instructions at the head of the history buffer must be completed without exception the instructions at the head of the history buffer must either be a mtspr , mtmsr , or rfi instruction, a memory reference, or a storage or cache control instruction. any instruction that does not meet these criteria is discarded with all of its side effects and the execution at the end of the interrupt handler resumes with the first instruction that was discarded. if all the instructions in the history buffer were allowed to complete, execution at the end of the interrupt handler resumes with the next instruction. external interrupt latency depends on the time required to reference memory. the measurement is equal to one of the following, in addition to the interval between b and e shown in table 6-4. longest load/store multiple/string instruction used one bus cycle for aligned access two bus cycles for unaligned access actual system-level interrupt latency can be worse than just the interval between b and e. if the instruction prior to the one in which the interrupt gets assigned generates an exception, the exception is recognized first. if minimal interrupt latency is an important system parameter, interrupt handlers should save the machine context and reenable an external interrupt as quickly as possible so that a pending external interrupt will get fast service. 6.2.8 interrupt ordering there are two major types of interrupts: instruction-related interrupts asynchronous (noninstruction-related) interrupts instruction-related exceptions are detected while the instruction is in various stages of being processed by the core. exceptions detected early in instruction processing avoid detection of other exceptions for the same instruction. this earlier interrupt will eventually be taken. if more than one instruction in the pipeline causes an exception, only the first exception is taken and causes an interrupt. remaining instruction-induced exceptions are ignored. the following table lists the instruction-related interrupts in the order of detection within the instruction processing.
the powerpc core 6-14 mpc801 user? manual motorola 6 more than one asynchronous interrupt cause can be present at any time. however, when more than one interrupt causes are present, only the highest priority interrupt is taken, as shown in the following table. table 6-5. detection order of instruction-related interrupts number interrupt type caused by 1 trace trace bit asserted 1 2 implementation dependent instruction tlb miss instruction mmu tlb miss 3 implementation dependent instruction tlb error instruction mmu protection / translation error 4 machine check interrupt fetch error 5 debug i- breakpoint match detection 6 implementation dependent software emulation interrupt attempt to invoke unimplemented feature 1 floating point unavailable attempt to is made to execute floating point instruction and msr fp =0 7 2 privileged instruction attempt to execute privileged instruction in problem mode alignment interrupt load/store checking system call interrupt sc instruction trap trap instruction 8 implementation dependent data tlb miss data mmu tlb miss 9 implementation dependent data tlb error data mmu tlb protection / translation error 10 machine check interrupt load or store access error 11 debug l- breakpoint match detection notes: 1. the trace mechanism is implemented by letting one instruction go as if no trace is enabled and trapping the second instruction. this, of course, refers to this second instruction. 2. exclusive for any one instruction. table 6-6. interrupt priorities mapping number interrupt type caused by 1 development port nonmaskable interrupt signal from the development port 2 system reset nmi_l assertion 3 instruction-related interrupts instruction processing 4 peripheral breakpoint request or development port maskable interrupt breakpoint signal from any peripheral 5 external interrupt signal from the interrupt controller 6 decrementer interrupt decrementer request
the powerpc core motorola mpc801 user? manual 6-15 6 6.3 the register unit the fixed-point register bank holds thirty-two 32-bit fixed-point registers and some control registers. the register unit holds the general register files of the core and performs the following operations: decoding of the operand fields of all sequential instructions drives the operand buses as requested by the execution unit performs scoreboard checking and signing samples the resulting data from the writeback bus 6.3.1 the control registers the following tables describe the control registers that are implemented within the mpc801. table 6-7. standard special-purpose registers spr register name privileged serialize access decimal spr 5:9 spr 0:4 1 00000 00001 xer no write: full sync read: sync relative to load/store operations 8 00000 01000 lr no no 9 00000 01001 ctr no no 18 00000 10010 dsisr yes write: full sync read: sync relative to load/store operations 19 00000 10011 dar yes write: full sync read: sync relative to load/store operations 22 00000 10110 dec yes write 26 00000 11010 srr0 yes write 27 00000 11011 srr1 yes write 272 01000 10000 sprg0 yes write 273 01000 10001 sprg1 yes write 274 01000 10010 sprg2 yes write 275 01000 10011 sprg3 yes write 287 01000 11111 pvr yes no (read-only register)
the powerpc core 6-16 mpc801 user? manual motorola 6 table 6-8. standard timebase register mapping spr register name privileged serialize access decimal spr 5:9 spr 0:4 268 01000 01100 tb read 2 no write - as a store 269 01000 01101 tbu read 2 no write - as a store 284 01000 11100 tb write 3 yes write - as a store 285 01000 11101 tbu write 3 yes write - as a store notes: 1. extended opcode for mftb , 371 rather then 339. 2. any write ( mtspr ) to this address, results in an implementation dependent software emulation interrupt. 3. any read ( mftb ) to this address, results in an implementation dependent software emulation interrupt. table 6-9. additional special-purpose registers spr register name privileged serialize access decimal spr 5:9 spr 0:4 80 00010 10000 eie 1 yes write 81 00010 10001 eid yes write 82 00010 10010 nri yes write 144 00100 10000 cmpa 1 debug 3 fetch sync on write 145 00100 10001 cmpb debug fetch sync on write 146 00100 10010 cmpc debug fetch sync on write 147 00100 10011 cmpd debug fetch sync on write 148 00100 10100 icr debug fetch sync on write 149 00100 10101 der debug fetch sync on write 150 00100 10110 counta debug fetch sync on write 151 00100 10111 countb debug fetch sync on write 152 00100 11000 cmpe debug write: fetch sync read: synch relative to load/store operations 153 00100 11001 cmpf debug write: fetch sync read: synch relative to load/store operations 154 00100 11010 cmpg debug write: fetch sync read: synch relative to load/store operations
the powerpc core motorola mpc801 user? manual 6-17 6 155 00100 11011 cmph debug write: fetch sync read: synch relative to load/store operations 156 00100 11100 lctrl1 debug write: fetch sync read: synch relative to load/store operations 157 00100 11101 lctrl2 debug write: fetch sync read: synch relative to load/store operations 158 00100 11110 ictrl debug fetch sync on write 159 00100 11111 bar debug write: fetch sync read: synch relative to load/store operations 630 10011 10110 dpdr debug read and write 631 10011 10111 dpir 4 yes fetch 638 10011 11110 immr yes write - as a store 560 10001 10000 ic_cst yes write - as a store 561 10001 10001 ic_adr yes write - as a store 562 10001 10010 ic_dat yes write - as a store 568 10001 11000 dc_cst yes write - as a store 569 10001 11001 dc_adr yes write - as a store 570 10001 11010 dc_dat yes write - as a store 784 11000 10000 mi_ctr yes write - as a store 786 11000 10010 mi_ap yes write - as a store 787 11000 10011 mi_epn yes write - as a store 789 11000 10101 mi_twc (mi_l1dl2p) yes write - as a store 790 11000 10110 mi_rpn yes write - as a store 816 11001 10000 mi_dbcam yes write - as a store 817 11001 10001 mi_dbram0 yes write - as a store 818 11001 10010 mi_dbram1 yes write - as a store 792 11000 11000 md_ctr yes write - as a store 793 11000 11001 m_casid yes write - as a store 794 11000 11010 md_ap yes write - as a store table 6-9. additional special-purpose registers (continued) spr register name privileged serialize access decimal spr 5:9 spr 0:4
the powerpc core 6-18 mpc801 user? manual motorola 6 795 11000 11011 md_epn yes write - as a store 796 11000 11100 m_twb (md_l1p) yes write - as a store 797 11000 11101 md_twc (md_l1dl2p) yes write - as a store 798 11000 11110 md_rpn yes write - as a store 799 11000 11111 m_tw (m_save) yes write - as a store 824 11001 11000 md_dbcam yes write - as a store 825 11001 11001 md_dbram0 yes write - as a store 826 11001 11010 md_dbram1 yes write - as a store notes: 1. refer to section 6.2.4.1 restartability after an interrupt . 2. refer to section 18.3.3.3 development port serial communications . 3. protection of registers designated with ?ebug privilege is described in section 18.5.1 protecting the development port registers . 4. this register is a fetch-only register, using mtspr is ignored and using mfspr gives an unde?ed value. table 6-10. other control registers description name comments privileged serialize access machine state register msr yes write fetch sync condition register cr no only mtcrf table 6-9. additional special-purpose registers (continued) spr register name privileged serialize access decimal spr 5:9 spr 0:4
the powerpc core motorola mpc801 user? manual 6-19 6 6.3.1.1 physical location of special registers some special registers are physically located outside of the core. access to these registers is gained as it is to any other special register, via the appropriate mtspr and mfspr instructions through the internal chip buses. apart from the powerpc timebase counter and decrementer that are implemented within the system interface unit, in the current implementation the following encoding is reserved for special registers not located within the core. for these registers, a bus cycle is performed on the internal bus with the following address. if any address error or error occurs on this cycle, an implementation dependent software emulation interrupt is taken. table 6-11. encoding of special registers located outside the core spr reserved for spr 5:9 spr 0:4 100xx 110xx xxxxx core registers external to the core 1x0xx x0xxx reserved 10011 x0xxx system interface unit internal registers 0xxxx xxxxx if appears on the internal bus signifies decrementer or timebase 10000 x0xxx reserved 10000 x1xxx reserved 1100x x0xxx instruction mmu implementation specific control 1100x x1xxx data mmu implementation specific control 10001 x00xx instruction cache registers 10001 x10xx data cache registers table 6-12. address of special registers located outside the core 0:17 18:22 23:27 28:31 0. .0 spr 0:4 spr 5:9 0000
the powerpc core 6-20 mpc801 user? manual motorola 6 6.3.1.2 bit assignment of the control registers 6.3.1.2.1 machine state register. the 32-bit machine state register (msr) defines the state of the processor. it can be read by the mfmsr instruction. bits 0?2?eserved these bits are reserved and should be set to 0. bits 0, 5, and 9 are loaded from the corresponding bit in the msr when an interrupt is taken. the appropriate bit in the msr is loaded from this bit when an rfi is executed. reserved bits in the msr are set from the source value on write and return the value last set for it on read. pow?ower management enable power management may not exist on all implementations. if it is not implemented, this bit is reserved. 0 = power management is disabled (normal operation mode). 1 = power management is enabled (reduced power mode). bit 14?eserved this bit is reserved and should be set to 0. ile?nterrupt little-endian mode when an interrupt occurs, this bit is copied to msr le to select the endian mode for the context established by the interrupt. ee?xternal interrupt enable 0 = the processor is disabled against external and decrementer interrupts. 1 = the processor is enabled to take an external or decrementer interrupt. pr?roblem state 0 = the processor is privileged to execute any instruction. 1 = the processor can only execute the nonprevileged instructions. fp?loating-point available 0 = the processor cannot execute any floating-point instructions, including floating-point loads, stores, or moves. 1 = the processor can execute floating-point instructions. msr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved pow res ile bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field ee pr fp me fe0 se be fe1 res ip ir dr reserved ri le
the powerpc core motorola mpc801 user? manual 6-21 6 me?achine check enable 0 = machine check interrupts are disabled. 1 = machine check interrupts are enabled. fe0?loating-point exception mode 0 0 = ignore exceptions mode. 0 = imprecise nonrecoverable mode. 1 = imprecise recoverable mode. 1 = precise mode. se?ingle-step trace enable this bit controls the optional trace interrupt. if the trace interrupt is not implemented, this bit is reserved. be?ranch trace enable this bit controls the optional trace interrupt. if the trace interrupt is not implemented, this bit is reserved. fe1?loating-point exception mode 1 0 = ignore exceptions mode. 1 = imprecise nonrecoverable mode. 0 = imprecise recoverable mode. 1 = precise mode. bit 24?eserved this bit is reserved and should be set to 0. ip?nterrupt prefix in the following description, nnnn is the offset of the interrupt: 0 = interrupts are vectored to the real address 0x000n_nnnn in 32-bit implementations and real address 0x0000_0000_000n_nnnn in 64-bit implementations. 1 = interrupts are vectored to the real address 0xfffn_nnnn in 32-bit implementations and real address 0xffff_ffff_fffn_nnnn in 64-bit implementations. ir?nstruction relocate 0 = instruction address translation is off. 1 = instruction address translation is on. dr?ata relocate 0 = data translation is off. 1 = data translation is on. bits 28?9?eserved these bits are reserved and should be set to 0.
the powerpc core 6-22 mpc801 user? manual motorola 6 ri?ecoverable interrupt 0 = interrupt is not recoverable. 1 = interrupt is recoverable. le?ittle-endian mode 0 = the processor runs in big-endian mode. 1 = the runs in little-endian mode. 6.3.1.2.2 condition register. the 32-bit condition register (cr) reflects the result of certain operations and provides a mechanism for testing and branching. the bits in this register are grouped into eight 4-bit fields. the fields of the condition register can be set in one of the following ways: specified fields of the condition register can be set by a move instruction ( mtcrf ) from a general-purpose register. a specified field of the condition register can be copied to the field by the mcrxr instruction. a specified field of the fixed-point exception cause register can be copied to the condition register by the mcrfs instruction. condition register logical instructions can be used to perform logical operations on the specified bits in the condition register. cr0 can be the implicit result of an integer instruction. cr1 can be the implicit result of a floating-point instruction. a specified cr field can indicate the result of either an integer or floating-point compare instruction. bit 0 1 2 3 4 5 6 7 field cr0 cr1 cr2 cr3 cr4 cr5 cr6 cr7
the powerpc core motorola mpc801 user? manual 6-23 6 6.3.1.2.3 fixed-point exception cause register. the following table provides the bit assignments for the fixed-point exception cause register (xer). so?ummary overflow this bit is set whenever an instruction (except mtspr ) sets the ov bit. once set, the so bit remains set until it is cleared by an mtspr or mcrxr instruction. it is not altered by compare instructions or other instructions that cannot overflow. executing an mtspr instruction to the xer, supplying the values zero for so and one for ov, causes so to be cleared and ov to be set. ov?verflow this bit is set to indicate that an overflow has occurred during the execution of an instruction. add, subtract from, and negate instructions have oe = 1 set the ov bit if the carry out of the msb is not equal to the carry out of the msb + 1, and clear it otherwise. multiply low and divide instructions have oe = 1 set the ov bit if the result cannot be represented in 64 bits ( mulid , divd , divdu ) or in 32 bits ( mulw , divw , divwu ) and clear it otherwise. the ov bit is not altered by compare instructions that cannot overflow (except mtspr to the xer and mcrxr ). ca?arry this bit is set during the execution of the following instructions: add carrying, subtract from carrying, add extended, and subtract from extended instructions set ca if there is a carry out of the msb and clear it otherwise. shift right algebraic instructions set ca if any 1 bits have been shifted out of a negative operand and clear it otherwise. the ca bit is not altered by compare instructions or by other instructions that cannot carry (except shift right algebraic, mtspr to the xer, and mcrxr ). bits 3?4?eserved these bits are reserved and should be set to 0. bcnt?yte count for load/store string operations these bits specify the number of bytes to be transferred by a lswx or stswx instruction. xer bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field so ov ca reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved bcnt
the powerpc core 6-24 mpc801 user? manual motorola 6 6.3.1.3 initializing the control registers 6.3.1.3.1 system reset interrupt. a system reset interrupt occurs when the irq0 pin is asserted. the only control registers affected by the system reset interrupt are the msr, srr0, and srr1 registers. for information on the values of these registers, refer to section 7.3.7.3.1 system reset interrupt . 6.3.1.3.2 hard/soft reset. when a hard or soft reset occurs, the registers affected by system reset are set similar to the way the system reset interrupt is set. the following list shows the differences between how each register is set: srr0, srr1?et to an undefined value. msr ip ?rogrammable. msr me ?et to zero. ictrl?et to 0. lctrl1?et to 0. lctrl2?et to 0. counta 16-31 ?et to 0. countb 16-31 ?et to 0. icr?et to 0 (no interrupt occurred). der 2,14,28:31 ?et to 1 (all debug specific interrupts cause debug mode entry). 6.4 the fixed-point unit the fixed-point unit implements all fixed-point processor instructions, except the fixed-point storage access instructions that are implemented by the load/store unit. see the powerpc family: the programming environment (mpcfpe/d) manual for more information. 6.4.1 updating xer with divide instructions the divide instructions have a relatively long latency, but those instructions can update the ov bit in the xer after one cycle. therefore, data dependency on the xer is limited to one cycle, although the divide instruction latency can be a maximum of 11 clocks.
the powerpc core motorola mpc801 user? manual 6-25 6 6.5 the load/store unit the load/store unit handles all data transfers between the register file and chip internal bus. it is implemented as an independent execution unit so that stalls in the memory pipeline do not cause the master instruction pipeline to stall, unless there is a data dependency. the unit is fully pipelined so that memory instructions of any size can be issued on back-to-back cycles. there is a 32-bit wide data path between the load/store unit and fixed-point register file. single-word accesses to the internal on-chip data ram require one clock, which results in two clock latencies and double-word accesses require two clocks, which results in three clock latencies. as the internal bus is 32 bits wide, double-word transfers take two bus accesses. the load/store unit implements all of the powerpc load/store instructions in hardware, including unaligned and string accesses. the following is a list of the load/store unit? main features: supports many instructions a two entry load/store instruction address queue pipelined operation minimal load latency? clocks (using 1 clock on-chip data ram) minimal store latency? clock. the load/store unit ends the store execution in 2 clocks using 1 clock on-chip data ram. load/store multiple and string instructions synchronize support of load/store breakpoint/watchpoint detection (address and data) figure 6-6 illustrates a conceptual block diagram of the load/store unit and its two queues. the address queue is a 2-entry queue shared by all load/store instructions and the fixed-point data queue is a 2-entry, 32-bit wide queue that holds fixed-point data. the load/store unit has a dedicated writeback bus so that loaded data received from the internal bus is written directly back to the fixed-point or floating-point register files.
the powerpc core 6-26 mpc801 user? manual motorola 6 figure 6-6. load/store unit functional block diagram to execute the multiple instructions, string instructions, unaligned accesses, and double-precision floating-point load/store instructions, the load/store unit contains an address incrementor that generates the needed addresses. this allows the unit to execute the unaligned accesses without stalling the master instruction pipeline. 6.5.1 load/store instruction when load or store instructions are encountered, the load/store unit checks the scoreboard to determine if all of the operands are available. these operands include: address register operands source data register operands (for store instructions) destination data register operands (for load instructions) destination address register operands (for load/store with update instructions) fixed-point queue address fixed-point store data load / store unit fixed-point load data d-cache / d-mmu core 32 fixed-point registers file fixed-point unit 32 32 32 address queue increment and data 32 32 interface
the powerpc core motorola mpc801 user? manual 6-27 6 if all operands are available, the load/store unit takes the instruction and enables the sequencer to issue a new instruction. then, using a dedicated interface, the load/store unit notifies the integer unit of the need to calculate the effective address. all load/store instructions are executed and terminated in order. if there are no prior instructions waiting in the address queue, the load/store instruction is issued to the data cache immediately at the time the instruction is taken. otherwise, if there are prior instructions remaining whose addresses have not yet been issued to the data cache, the instruction is inserted into the address queue and data is inserted into the respective store data queue. for load/store with update instructions, the destination address register is written back on the following clock, regardless of the address queue? state. 6.5.2 synchronizing load/store instructions the following load/store instructions are not taken until all previous instructions have terminated. load/store multiple instructions lmw , stmw storage synchronization instructions lwarx , stwcx , sync string instructions lswi , lswx , stswi , stswx move to internal special registers and move to off-core special registers the following load/store instructions must terminate before more instructions can be issued: load/store multiple instructions lmw , stmw storage synchronization instructions lwarx , stwcx , sync string instructions lswi , lswx , stswi , stswx 6.5.3 instructions issued to the data cache the load/store unit pipelines load accesses. the individual cache cycles of all multiregister instructions ( lmw and stmw ) and unaligned accesses are pipelined into the data cache interface. 6.5.4 issuing store instruction a new store instruction is not issued to the data cache until all prior instructions have terminated without an exception. this is because the powerpc supports the precise interrupt model. when a load instruction is followed by a store instruction, a one clock delay is inserted between the load bus cycle termination and the store cycle issue.
the powerpc core 6-28 mpc801 user? manual motorola 6 6.5.5 nonspeculative load instructions load instructions targeted at a nonspeculative memory region are identified as nonspeculative one clock cycle after the previous load/store bus cycle termination, but only if all prior instructions have terminated normally and without an exception. the nonspeculative identification relates to the state of the cycle? associated instruction. in case of lmw, although the cycles are pipelined into the bus they are all marked as nonspeculative as the instruction is nonspeculative. in case of a single register load instruction for which more than one bus cycle is generated, some of the cycles can be marked as speculative while later cycles can be marked as nonspeculative after all prior instructions terminate. when executing speculative load cycles to nonspeculative external memory region, no external cycles are generated until the load instruction becomes nonspeculative. 6.5.6 executing unaligned instructions the load/store unit supports fixed-point unaligned accesses in the hardware. the 32-bit l-bus only supports naturally aligned transfers. in the case of an unaligned instruction, the load/store unit breaks the instruction into a series of aligned transfers that are pipelined into the bus. figure 6-7 illustrates the number of bus cycles needed to execute unaligned instructions. figure 6-7. number of bus cycles needed for unaligned, single register fixed-point load/store instructions 00? 00 01 02 03 1 bus cycle 04? 04 05 06 07 00? 00 01 02 03 1 bus cycle 04? 04 05 06 07 00? 00 01 02 03 1 bus cycle 04? 04 05 06 07 00? 00 01 02 03 2 bus cycles 04? 04 05 06 07 00? 00 01 02 03 2 bus cycles 04? 04 05 06 07 00? 00 01 02 03 2 bus cycles 04? 04 05 06 07 00? 00 01 02 03 3 bus cycles 04? 04 05 06 07 00? 00 01 02 03 3 bus cycles 04? 04 05 06 07
the powerpc core motorola mpc801 user? manual 6-29 6 6.5.7 little-endian mode support the load/store unit implements little-endian mode in which the modified address is issued to the data cache. when an individual scalar unaligned transfer or the execution of a multiple/string instruction occurs, an alignment exception is generated. 6.5.8 atomic update primitives the lwarx and stwcx instructions are atomic update primitives. storage reservation accesses made by the same processor are implemented by the load/store unit. the external bus interface module implements storage reservation as it is related to accesses made by external bus masters. accesses made by other internal masters to internal memories implements storage reservation as it relates to special internal bus snoop logic. this logic is implemented in the data cache. when a lwarx instruction is executed the load/store unit issues a cycle to the data cache with a special attribute. in the case of an external memory access, this attribute causes the external bus interface module to set a storage reservation on the cycle address. the external bus interface module is then responsible for snooping the external bus or getting an indication from external snoop logic if the storage reservation is broken by some other processor accessing the same location. when an stwcx instruction to external memory is executed, the external bus interface module checks to see if a reservation was lost. if loss of reservation has occurred, the cycle is blocked from going to the external bus and the external bus interface module notifies the load/store unit of a stwcx failure. the mpc801 storage reservation supplies hooks for the support of storage reservation implementation in a hierarchical bus structure. refer to section 13.4.9 storage reservation protocol for a full description of the storage reservation mechanism. in case of storage reservation on internal memory, a lwarx indication causes the on-chip snoop logic to latch the address. this logic notifies the load/store unit in the case of an internal master store access, then the reservation is reset. if a new lwarx instruction address phase is successfully executed it replaces any previous storage reservation address at the appropriate snoop logic. however, when an stwcx instruction is executed, the storage reservation is canceled, unless an alignment interrupt condition is detected. 6.5.9 instruction timing the following table summarizes the different load/store instructions timing for zero wait state memory references on a parked bus. with external memory accesses, pipelined external accesses are assumed.
the powerpc core 6-30 mpc801 user? manual motorola 6 string instructions are broken into a series of aligned bus accesses. figure 6-8 illustrates the maximum number of bus cycles needed for string instruction execution. figure 6-8. number of bus cycles needed for string instruction execution 6.5.10 stalling storage control instructions a storage control instruction waits one clock before it is taken. 6.5.11 accessing off-core special registers access to special registers that are implemented off-core is executed by the load/store unit via the internal bus using a special cycle. refer to section 6.3.1.1 physical location of special registers for detailed information. if the access terminates in a bus error, then an implementation dependent software emulation interrupt is taken. all write operations to off-core special registers are previously synchronized. in other words, the instruction is not taken until all prior instructions terminate. 6.5.12 storage control instructions cache management instructions and lookaside buffer management instructions are implemented by the load/store unit. these instructions are implemented using special write cycles that are issued to the data cache interface. table 6-13. load/store instructions timing instruction type latency cleared from load/store unit data cache external memory data cache external memory fixed-point single target register load (aligned) 2 clocks 5 clocks 2 clocks 5 clocks fixed-point single target register store (aligned) 1 clock 1 clock 2 clocks 5 clocks load/store multiple 1 + n 1 + n note: n denotes the number of registers transferred. 00? 00 01 02 03 04? 04 05 06 07 2 bus cycles 08? 08 09 0a 0b word transfers 3 bus cycles 0c? 0c 0d 0e 0f 10? 10 11 12 13 14? 14 15 16 17 2 bus cycles 18? 18 19 1a 1b 3n n1 + 3 -------------- ? ?? ++ 3n n1 + 3 -------------- ? ?? ++
the powerpc core motorola mpc801 user? manual 6-31 6 6.5.13 exception processing an exception is a special condition that preempts normal processing. exception processing is the transition from normal mode program execution to the execution of a routine that deals with an exception. 6.5.13.1 using dar, dsisr, and bar the load/store unit keeps track of all instructions and bus cycles. when a bus error occurs, the data address register (dar) is loaded with the cycle? effective address. with a multicycle instruction, the effective address of the first offending cycle is loaded. the data/storage interrupt status register (dsisr) notifies the error when an exception is caused by the load/store. when a memory management unit error occurs, this register is loaded with the error status delivered by the memory management unit. with other exceptions, the dsisr is loaded with the instruction information as defined by the powerpc architecture for alignment exception. the breakpoint address register (bar) notifies the address on which an l-bus breakpoint occurred. for a multicycle instruction, the bar contains the address of the first cycle with which the breakpoint condition was associated. the bar has a valid value only when a data breakpoint interrupt is taken. at any other time, its value is boundedly undefined. the following cases cause the dar, bar and dsisr to be updated. table 6-14. dar, bar, and dsisr value summary interrupt type dar value dsisr value bar value data storage interrupt cycle ea mmu error status undefined alignment interrupt data ea instruction information undefined l-bus breakpoint interrupt does not change does not change cycle ea machine check interrupt cycle ea instruction information undefined implementation dependent software emulation interrupt does not change does not change undefined floating-point unavailable interrupt does not change does not change undefined program interrupt does not change does not change does not change
the powerpc core 6-32 mpc801 user? manual motorola 6
motorola mpc801 user? manual 7-1 7 section 7 powerpc architecture compliance this section describes implementation dependent choices made for the core on issues that are optional on the powerpc architecture as defined in the powerpc architecture books i, ii, and iii . it also describes features that exist in the architecture, but are not supported by the core. the information in this section is based on the powerpc books, but you should refer to the powerpc family: the programming environment (mpcfpe/d) manual for more information. 7.1 powerpc user instruction set architecture (book i) 7.1.1 computation modes the core is a 32-bit fixed-point implementation of the powerpc architecture. any reference to 64-bit implementations in the powerpc architecture is not supported by the core. in addition, no floating point of the architecture is implemented. 7.1.2 reserved fields reserved fields in instructions are described under the specific instruction definition sections. unless otherwise stated in the specific instruction description, fields marked i , ii , and iii in the instruction are discarded by the core decoding. thus, this type of invalid form instructions yield results of the defined instructions with the appropriate field zero. in most cases, the reserved fields in registers are ignored on write and return zeros for them on read for any control register implemented by the core. exceptions to this rule are bits 16:23 of the fixed-point exception cause register (xer) and the reserved bits of the machine state register (msr), which are set by the source value on write and return the value last set for it on read. 7.1.3 classes of instructions nonoptional instructions (except floating-point load, store, and compute instructions) are implemented by the hardware. optional instructions are executed by implementation dependent code and any attempt to execute one of these commands causes the core to take the implementation dependent software emulation interrupt (offset x?1000?of the vector table). illegal and reserved instruction class instructions are supported by implementation dependent code and, thus, the core hardware generates the implementation dependent software emulation interrupt. the way the core treats invalid and preferred instruction forms is described in the specific processor compliance sections.
powerpc architecture compliance 7-2 mpc801 user? manual motorola 7 7.1.4 exceptions invocation of the system software for any exception caused by an exception in the core is precise, regardless of the type and setting. 7.1.5 the branch processor 7.1.6 fetching instructions the core fetches many instructions into its internal buffer (the instruction prefetch queue) prior to execution. if a program modifies the instructions it intends to execute, it should call a system library program to ensure that the modifications are visible to the instruction fetching mechanism prior to executing the modified instructions. 7.1.7 branch instructions the core implements all the instructions for the branch processor according to the powerpc user instruction set architecture book i . for details about the performance of various instructions, see table 8-1 of this manual. 7.1.7.1 invalid branch instruction forms bits marked with z in the bo encoding definition are discarded by the core decoding. thus, these types of invalid form instructions yield results of the defined instructions with the z bit zero. if the decrement and test ctr option is specified for the bcctr or bcctrl instructions, the target address of the branch is the new value of the ctr. condition is evaluated correctly, including the value of the counter after decrement. 7.1.7.2 branch prediction the core uses the y bit to predict path for prefetch. prediction is only done for not-ready branch conditions. no prediction is done for branches to the link or count register if the target address is not ready. see table 6-1 for more details. 7.1.8 the fixed-point processor the core implements the following fixed-point instructions: arithmetic instructions compare instructions trap instructions logical instructions rotate and shift instructions move to/from system register instructions all hardware instructions for the fixed-point processor are defined in the powerpc user instruction set architecture book i . for details about the performance of various instructions, see table 8-1 of this manual.
powerpc architecture compliance motorola mpc801 user? manual 7-3 7 7.1.8.0.1 move to/from system register instructions. move to/from invalid special registers in which spr0 =1 invokes the privilege instruction error interrupt handler if the processor is in problem state. for a list of all implemented special registers, refer to section 6.3.1 the control registers . 7.1.8.0.2 fixed-point arithmetic instructions. attempting to perform any of the following divisions in the divw[o][.] instruction 0x80000000 ? -1 ? 0 causes the contents of rt to be 0x80000000 and if rc =1, the contents of the bits in the cr field 0 are lt = 1, gt = 0, eq = 0, and so is set to the correct value. if an attempt is made to perform any of the divisions in the divw[o][.] instruction, ? 0. then, the contents of rt are 0x80000000 and if rc =1, the contents of the bits in the cr field 0 are lt = 1, gt = 0, eq = 0, and so is set to the correct value. in the cmpi , cmp , cmpli , and cmpl instructions, the l bit is applicable for 64-bit implementations and if l = 1 the instruction form is invalid. the core ignores this bit so the behavior when l = 1 is identical to the valid form instruction with l = 0. 7.1.9 the load/store processor the load/store processor supports all of the 32-bit implementation fixed-point powerpc load/store instructions in the hardware. 7.1.9.1 fixed-point load and store with update instructions for load with update and store with update instructions where ra =0, the ea is written into r0. for load with update instructions where ra = rt, ra is boundedly undefined. 7.1.9.2 fixed-point load and store multiple instructions for these types of instructions, ea must be a multiple of four. if it is not, the system alignment error handler is invoked. for a lmw instruction, the instruction completes normally. ra is then loaded from the memory location as follows: ra <- mem(ea+(ra-rt)*4, 4) 7.1.9.3 fixed-point load string instructions load string instructions behave the same as load multiple instructions, with respect to invalid format in which ra is in the range of registers to be loaded. if ra is in the range, it is updated from memory. 7.1.9.4 storage synchronization instructions for these type of instructions, ea must be a multiple of four. if it is not, the system alignment error handler is invoked. 7.1.9.5 optional instructions no optional instructions are supported.
powerpc architecture compliance 7-4 mpc801 user? manual motorola 7 7.1.9.6 little-endian byte ordering the load/store unit supports little-endian byte ordering as specified in powerpc user instruction set architecture (book i) . in little-endian mode, attempting to execute an individual scalar unaligned transfer, as well as a multiple or string instruction, causes an alignment interrupt. 7.2 powerpc virtual environment architecture (book ii) 7.2.1 storage model the mpc801 instruction and data caches are defined as follows: physically addressed 2k instruction cache physically addressed 1k data cache two-way set-associative managed with lru replacement algorithm 16-byte (4 words) line size with one valid bit per line 7.2.1.1 memory coherence hardware memory coherence is not supported in the mpc801 hardware, but can be performed in the software or by defining storage as cache inhibited as needed. in addition, the mpc801 does not provide any data storage attributes for an external system. 7.2.1.2 atomic update primitives both the lwarx and stwcx instructions are implemented according to the powerpc architecture requirements. when the storage accessed by the lwarx and stwcx instructions is in the cache-allowed mode, it is assumed that the system works with the single master in this storage region. therefore, if a data cache miss occurs, the access on the internal and external buses does not have a reservation attribute. the mpc801 does not cause the system data storage error handler to be invoked if the storage accessed by the lwarx and stwcx instructions is in the writethrough required mode. also, the mpc801 does not provide support for snooping an external bus activity outside of the chip. the provision is made to cancel the reservation inside the mpc801 by using the cr and kr input pins. 7.2.2 the effect of operand placement on performance the load/store unit hardware supports all of the powerpc load/store instructions. an optimal performance can be obtained for naturally aligned operands. these accesses result in optimal performance (one bus cycle) for a maximum size of 4 bytes and good performance (two bus cycles) for double precision floating-point operands. unaligned operands are supported in the hardware and are broken into a series of aligned transfers. the effect of operand placement on performance is as stated in powerpc virtual environment architecture book ii, except for the case of 8-byte operands.
powerpc architecture compliance motorola mpc801 user? manual 7-5 7 since the mpc801 uses a 32-bit wide data bus, the performance is good, rather than optimal . refer to section 6.5.6 executing unaligned instructions for a description of fixed-point unaligned instruction execution and timing and to section 6.5.9 instruction timing for a description of string instruction timing. 7.2.3 the storage control instructions the mpc801 interprets the cache control instructions icbi , isync , dcbt , dcbi , dcbf , dcbz , dcbst , eieio , and dcbtst ?s if they pertain only to the mpc801 cache. these instructions do not broadcast. any bus activity caused by these instructions is a direct result of performing the operation on the mpc801 cache. 7.2.3.1 instruction cache block invalidate (icbi) the effective address is translated by the memory management unit (according to the msr ir ) and the associative block in the instruction cache is invalidated if hit. 7.2.3.2 instruction synchronize (isync) the isync instruction waits for all previous instructions to complete and then discards any prefetched instructions, thus causing the subsequent instruction to be fetched or refetched from memory and executed. 7.2.3.3 data cache block touch (dcbt) the block associated with this instruction is checked for hit in the cache. if it is a miss, the instruction is treated as a regular miss, except that the bus error does not cause an interrupt. if no error occurs, the line is written into the cache. 7.2.3.4 data cache block touch for store (dcbtst) the block associated with this instruction is checked for a hit in the cache. if it is a miss, the instruction is treated as a regular miss, except that bus error does not cause an interrupt. if no error occurs, the line is written into the cache. 7.2.3.5 data cache block set to zero (dcbz) this instruction is executed according to the definition in powerpc virtual environment architecture book ii . 7.2.3.6 data cache block store (dcbst) this instruction is executed according to the definition in powerpc virtual environment architecture book ii . 7.2.3.7 data cache block invalidate (dcbi) the effective address is translated by the memory management unit (according to the msr ir bit) and the associative block in the data cache is invalidated if hit. 7.2.3.8 data cache block flush (dcbf) this instruction is executed according to the definition in powerpc virtual environment architecture book ii .
powerpc architecture compliance 7-6 mpc801 user? manual motorola 7 7.2.3.9 enforce in-order execution of i/o (eieio) when executing an eieio instruction, the load/store unit waits until all previous accesses have terminated before issuing cycles related to load/store instructions that follow eieio . 7.2.4 timebase a description of the timebase register can be found in section 12 system interface unit and in section 5 clocks and power control . 7.3 powerpc operating environment architecture (book iii) the mpc801 has an internal memory space that includes memory-mapped control registers and memory that is used by various modules on the chip. this memory is part of the main memory as seen by the core but cannot be accessed by any external system master. 7.3.1 the branch processor 7.3.1.1 branch processor registers the branch processor registers consist of the machine state and processor version registers. 7.3.1.1.1 machine state register. the floating-point exception mode is ignored by the mpc801. the ip bit initial state after reset is set as programmed by the reset configuration as specified by the section 12 system interface unit . 7.3.1.1.2 processor version register. in the processor version register (pvr), the value of the version field is x?050? in addition, the value of the revision field is x?000?and it is incremented each time the software distinguishes between the core revisions. 7.3.1.2 branch processor instructions the core implements all the branch processor instructions defined in powerpc user instruction set architecture book i . for details about the performance of various instructions, see table 8-1 of this manual. 7.3.2 the fixed-point processor 7.3.2.1 special-purpose registers the special-purpose registers consist of the unsupported and added registers. 7.3.2.1.1 unsupported registers. the following registers are not supported by the mpc801. refer to section 7.3.3 storage model for more details. sdr 1 ibat2u dbat1u ibat0l ibat3l dbat2l ear ibat2l dbat1l ibat1u dbat0u dbat3u ibat0u ibat3u dbat2u ibat1l dbat0l dbat3l
powerpc architecture compliance motorola mpc801 user? manual 7-7 7 7.3.2.1.2 added registers. for a list of the added special-purpose registers, see table 6-9. 7.3.3 storage model page sizes are 4k, 16k, 512k, and 8m and an optional sub-page granularity of 1k for 4k pages comes to a maximum real memory size of 4g. neither ordinary or direct-store segments are supported. 7.3.3.1 address translation if address translation is disabled (msr ir =0 for instruction accesses or msr dr =0 for data accesses), the effective address is treated as the real address and is passed directly to the memory subsystem. otherwise, the effective address is translated by using the translation lookaside buffer (tlb) mechanism of the memory management unit. instructions are not fetched from no-execute or guarded storage and data accesses are not executed speculatively to or from the guarded storage. the features of the memory management unit hardware is as follows: 32-entry fully associative instruction tlb 32-entry fully associative data tlb supports up to 16 virtual address spaces supports 16 access protection groups supports fast software tablewalk mechanism 7.3.4 reference and change bits no reference bit is supported by the mpc801. however, the change bit is supported by using the data tlb error interrupt mechanism when writing to an unmodified page. 7.3.5 storage protection two main protection modes are supported by the mpc801: domain manager mode powerpc mode for more details, refer to section 11 memory management unit . 7.3.6 storage control instructions 7.3.6.1 data cache block invalidate (dcbi) this instruction is executed according to the definition in powerpc operating environment architecture book iii . 7.3.6.2 tlb invalidate entry (tlbie) this instruction is performed as defined by the architecture, except that the 22 most-significant bits of the ea are used for address compare.
powerpc architecture compliance 7-8 mpc801 user? manual motorola 7 7.3.6.3 tlb invalidate all (tlbia) this instruction is performed as defined by the architecture. 7.3.6.4 tlb synchronize (tlbsync) this instruction is implemented like and functions like a regular mtspr instruction as it relates to engine synchronization with no further effects. 7.3.7 interrupts 7.3.7.1 classes all interrupts associated with storage are implemented as precise interrupts by the core, which means that a load/store instruction is not complete until all possible error indications are sampled from the load/store bus. this also implies that a store or nonspeculative load instruction is not issued to the load/store bus until all previous instructions have completed. if a late error occurs, a store cycle or a nonspeculative load cycle can be issued and aborted. 7.3.7.2 processing in each interrupt handler, when srr0 and ssr1 are saved, msr ri can be set to 1. 7.3.7.3 definitions the following table defines the offset value by interrupt type and the sections that follow describe each interrupt in detail. table 7-1. offset of first instruction by interrupt type offset (hex) interrupt type 00000 reserved 00100 system reset 00200 machine check 00300 data storage 00400 instruction storage 00500 external 00600 alignment 00700 program 00800 floating point unavailable 00900 decrementer 00a00 reserved 00b00 reserved 00c00 system call 00d00 trace 00e00 floating point assist 01000 implementation dependent software emulation
powerpc architecture compliance motorola mpc801 user? manual 7-9 7 7.3.7.3.1 system reset interrupt. a system reset interrupt occurs when the irq0 pin is asserted and the following registers are set. srr0?ave/restore register 0 set to the effective address of the next instruction the processor executes if no interrupt conditions are present. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bit is copied from the ile. other set to 0. 7.3.7.3.2 machine check interrupt. a machine check interrupt indication is received from the u-bus as a response to the address or data phase. it is usually caused by one of the following conditions: the accessed address does not exist a data error is detected 01100 implementation dependent instruction tlb miss 01200 implementation dependent data tlb miss 01300 implementation dependent instruction tlb error 01400 implementation dependent data tlb error 01500 - 01bff reserved 01c00 implementation dependent data breakpoint 01d00 implementation dependent instruction breakpoint 01e00 implementation dependent peripheral breakpoint 01f00 implementation dependent nonmaskable development port table 7-1. offset of first instruction by interrupt type (continued) offset (hex) interrupt type
powerpc architecture compliance 7-10 mpc801 user? manual motorola 7 as defined in powerpc operating environment architecture book iii , machine check interrupts are enabled when msr me =1. if msr me = 0 and a machine check interrupt indication is received, the processor enters the checkstop state. the behavior of the core in checkstop state is dependent on the working mode as defined in section 18.3.1.2 debug mode enable vs. debug mode disable . when the processor is in debug mode enable, it enters the debug mode instead of the checkstop state. when in debug mode disable, instruction processing is suspended and cannot be restarted without resetting the core. an indication that can generate an automatic reset in this condition is sent to the system interface unit. refer to the section 12 system interface unit for more details. if the machine check interrupt is enabled (msr me =1) it is taken. if srr1 bit 30 =1, the interrupt is recoverable and the following registers are set. srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt. srr1?ave/restore register 1 1 set to 1 for instruction fetch-related errors and 0 for load/store-related errors. 2? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me set to 0. le bit is copied from the ile. other set to 0. when using the load/store bus, the following registers are set: dsisr?ata/storage interrupt status register 0?4 set to 0. 15?6 set to bits 29?0 of the instruction if x-form and to 0b00 if d-form. 17 set to bit 25 of the instruction if x-form and to bit 5 if d-form. 18?1 set to bits 21?4 of the instruction if x-form and to bits 1? if d-form. 22?1 set to bits 6?5 of the instruction. dar?ata address register set to the effective address of the data access that caused the interrupt. execution resumes at offset x?0200?from the base address indicated by msr ip . 7.3.7.3.3 data storage interrupt. a data storage interrupt is never generated by the hardware. however, the software can branch to this location as a result of either an implementation specific data tlb error or miss interrupt.
powerpc architecture compliance motorola mpc801 user? manual 7-11 7 7.3.7.3.4 instruction storage interrupt. an instruction storage interrupt is never generated by the hardware, but the software can branch to this location as a result of an implementation specific instruction tlb error interrupt. 7.3.7.3.5 alignment interrupt. an alignment interrupt occurs as a result of one of the following conditions: the operand of a floating-point load or store is not word aligned. the operand of a load/store multiple is not word aligned. the operand of a lwarx or stwcx is not word aligned. the operand of a load/store individual scalar instruction is not naturally aligned when msr le = 1. an attempt to execute a multiple/string instruction is made when msr le = 1. 7.3.7.3.6 program interrupt. a floating-point enabled exception type program interrupt is not generated by the mpc801. likewise, an illegal instruction type program interrupt is not generated by the core, but an implementation dependent software emulation interrupt is generated instead. a privileged instruction program interrupt is generated for an on-core valid special-purpose register (spr) field or any spr encoded as an external special register if spr 0 =1 and msr pr =1, as well as if an attempt to execute privileged instruction occurred when msr pr =1. see table 6-11 for details. 7.3.7.3.7 floating-point unavailable interrupt. the floating-point unavailable interrupt is not generated by the mpc801. an implementation dependent software emulation interrupt will be taken on any attempt to execute floating-point instruction, regardless of msr fp . 7.3.7.3.8 trace interrupt. a trace interrupt occurs if msr se = 1 and any instruction except rfi is successfully completed or if msr be = 1 and a branch is completed. notice that the trace interrupt does not occur after an instruction that causes an interrupt. the monitor/debugger software must change the vectors of other possible interrupt addresses to single-step these instructions. if this is unacceptable, other debug features can be used. refer to section 18 development support for more information. the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction following the executed instruction. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri .
powerpc architecture compliance 7-12 mpc801 user? manual motorola 7 msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. execution resumes at offset x?0d00?from the base address indicated by msr ip . 7.3.7.3.9 floating-point assist interrupt. the floating-point assist interrupt is not generated by the mpc801. an implementation dependent software emulation interrupt will be taken on any attempt to execute a floating-point instruction. 7.3.7.3.10 implementation dependent software emulation interrupt. an implementation dependent software emulation interrupt occurs as a result of one of the following conditions: when executing any unimplemented instruction, including all illegal and unimplemented optional and floating-point instructions. when executing a mtspr or mfspr that specifies an on-core unimplemented register, regardless of spr 0 . when executing a mtspr or mfspr that specifies an off-core unimplemented register and spr 0 =0 or msr pr =0. refer to section 7.3.7.3.6 program interrupt for more information. in addition, the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. execution resumes at offset x?1000?from the base address indicated by msr ip .
powerpc architecture compliance motorola mpc801 user? manual 7-13 7 7.3.7.3.11 implementation specific instruction tlb miss interrupt. this type of interrupt occurs if msr ir =1 and there is an attempt to fetch an instruction from a page whose effective page number cannot be translated by tlb. the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt. srr1?ave/restore register 1 0? set to 0. 4 set to 1. 10 set to 1. 11?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. some instruction tlb registers are set to the values described in section 11 memory management unit . execution resumes at offset x?1100?from the base address indicated by msr ip . 7.3.7.3.12 implementation specific instruction tlb error interrupt. this type of interrupt occurs as a result of one of the following conditions: the effective address cannot be translated. either the segment or page valid bit of this page is cleared in the translation table. the fetch access violates storage protection. the fetch access is to guarded storage and msr ir =1. the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt.
powerpc architecture compliance 7-14 mpc801 user? manual motorola 7 srr1?ave/restore register 1 1 set to 1 if the translation of an attempted access is not found in the translation tables. otherwise, set to 0. 2 set to 0. 3 set to 1 if the fetch access was to a guarded storage when msr ir = 1 or when bit 4 is set. otherwise, set to 0. 4 set to 1 if the storage access is not permitted by the protection mechanism; otherwise set to 0. in the first revision when this bit is set, bits 3 and 10 are also set, but in future revisions this bit may be set alone. 10 set to 1 when bit 4 is set. otherwise, set to 0. 11?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. some instruction tlb registers are set to a value described in section 11 memory management unit . execution resumes at offset x?1300?from the base address indicated by msr ip . 7.3.7.3.13 implementation specific data tlb miss interrupt. this type of interrupt occurs when msr dr =1 and there is an attempt to access a page whose effective page number cannot be translated by tlb. the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. some instruction tlb registers are set to the values described in section 11 memory management unit . execution resumes at offset x?1200?from the base address indicated by msr ip .
powerpc architecture compliance motorola mpc801 user? manual 7-15 7 7.3.7.3.14 implementation specific data tlb error interrupt. this type of interrupt occurs as a result of one of the following conditions: no effective address of a load , store , icbi , dcbz , dcbst , dcbf or dcbi instruction can be translated. either the segment or page valid bit of this page is cleared in the translation table. the access violates storage protection. an attempt was made to write to a page with a negated change bit. the following registers are set: srr0?ave/restore register 0 set to the effective address of the instruction that caused the interrupt. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. dsisr?ata/storage interrupt status register 0 set to 0. 1 set to 1 if the translation of an attempted access is not found in the translation tables. otherwise, set to 0. 2? set to 0. 4 set to 1 if the storage access is not permitted by the protection mechanism. otherwise set to 0. 5 set to 0. 6 set to 1 for a store operation and to 0 for a load operation. 7?1 set to 0. dar?ata address register set to the effective address of the data access that caused the interrupt. some instruction tlb registers are set to the values described in section 11 memory management unit . execution resumes at offset x?1400?from the base address indicated by msr ip .
powerpc architecture compliance 7-16 mpc801 user? manual motorola 7 7.3.7.3.15 implementation specific debug register. an implementation specific debug interrupt occurs as a result of one of the following conditions: when there is an internal breakpoint match. for more details, refer to section 18.2 watchpoint and breakpoint generation . when a peripheral breakpoint request is presented to the interrupt mechanism. when the development port request is presented to the interrupt mechanism. refer to section 18 development support for details on how to generate the development port request. the following registers are set: srr0?ave/restore register 0 for i-breakpoints, set to the effective address of the instruction that caused the interrupt. for l-breakpoint, set to the effective address of the instruction following the instruction that caused the interrupt. for development port maskable request or a peripheral breakpoint, set to the effective address of the instruction that the processor would have executed next if no interrupt conditions were present. if the development port request is asserted at reset, the value of srr0 is undefined. srr1?ave/restore register 1 1? set to 0. 10?5 set to 0. other loaded from bits 16?1 of the msr. in the current implementation, bit 30 of the srr1 is never cleared, except by loading a zero value from msr ri . if the development port request is asserted at reset, the value of srr1 is undefined. msr?achine state register ip no change. me no change. le bits are copied from the ile. other set to 0. for l-bus breakpoints, the following registers are set to: bar?reakpoint address register set to the effective address of the data access as computed by the instruction that caused the interrupt. dsisr?ata/storage interrupt status register do not change. dar?ata address register do not change.
powerpc architecture compliance motorola mpc801 user? manual 7-17 7 execution resumes at offset from the base address that msr ip indicates: x?1d00for an instruction breakpoint match x?1c00for a data breakpoint match x?1e00for a development port maskable request or a peripheral breakpoint x?1f00for a development port nonmaskable request 7.3.7.4 partially executed instructions in general, the architecture allows instructions to be partially executed when an alignment or data storage interrupt occurs. in the core, instructions are not executed if an alignment interrupt condition is detected or if a data storage interrupt is never generated by the hardware. in the mpc801, the instruction can be partially executed only when load/store instructions occur that cause multiple access to the memory subsystem?ultiple/string and unaligned load/store instructions. in this instance, the instruction can be partially completed if one of the accesses (except the first one) causes a miss in the data tlb. the implementation specific data tlb miss interrupt is taken in this case. for the update forms, the update register is not altered. 7.3.8 timer facilities descriptions of the timebase and decrementer registers can be found in section 12 system interface unit and in section 5 clocks and power control . 7.3.9 optional facilities and instructions any other powerpc operating environment architecture book iii optional facilities and instructions that are not discussed here are not implemented by the mpc801 hardware. any attempt to execute any of these instructions causes an implementation dependent software emulation interrupt to occur.
powerpc architecture compliance 7-18 mpc801 user? manual motorola 7
motorola mpc801 user? manual 8-1 8 section 8 instruction execution timing the following table lists the instruction execution timing in terms of latency and blockage of the appropriate execution unit. a serializing instruction has the effect of blocking all execution units. table 8-1. instruction execution timing instructions latency blockage execution unit serializing instruction branch instructions: b, ba, bl, bla, bc, bca, bcl, bcla, bclr, bclrl, bcctr, bcctl taken 2 2 branch unit no not taken 1 1 system call: sc, rfi serialize + 2 serialize + 2 yes cr logical: crand, crxor, cror, crnand, crnor, crandc, creqv, crorc, mcrf 1 1 cr unit no fixed-point trap instructions: twi, tw taken serialize + 3 serialize + 3 alu / bfu after not taken 1 1 no move to special registers: mtspr, mtcrf, mtmsr, mcrxr except mtspr to lr and ctr and external to the core registers serialize + 1 serialize + 1 all yes move to lr, ctr: mtspr 1 1 branch unit no move to external to the core special registers: mtspr, mttb, mttbu serialize + 1 8 serialize + 1 ldst yes move from external to the core special registers: mfspr, mftb, mftbu load latency 1 ldst no move from special registers located internal to the core: mfspr 1 11 see list 2
instruction execution timing 8-2 mpc801 user? manual motorola 8 move from others: mfcr, mfmsr serialize + 1 serialize + 1 see list 3 fixed-point arithmetic: addi, add[o][.], addis, subf[o][.], addic, subfic, addic., addc[o][.], adde[o][.], subfc[o][.], subfe[o][.], addme[o][.], addze[o][.], subfme[o][.], subfze[o][.], neg[o][.] 1 1 alu / bfu no fixed-point arithmetic (divide instructions): divw[o][.], divwu[o][.] min 2 max 11 4 min 2 max 11 5 imul / idiv no fixed-point arithmetic (multiply instructions): mulli, mullw[o][.], mulhw[.], mulhwu[.] 2 1-2 6 imul / idiv no fixed-point compare: cmpi, cmp, cmpli, cmpl 1 1 alu / bfu no fixed-point logical: andi., andis., ori, oris, xori, xoris, and[.], or[.], xor[.], nand[.], nor[.], eqv[.], andc[.], orc[.], extsb[.], extsh[.], cntlzw[.] 1 1 alu / bfu no fixed-point rotate and shift: rlwinm[.], rlwnm[.], rlwimi[.], slw[.], srw[.], srawi[.], sraw[.] 1 1 alu / bfu no fixed-point load instructions: lbz, lbzu, lbzx, lbzux, lhz, lhzu, lhzx, lhzux, lha, lhau, lhax, lhaux, lwz, lwzu, lwzx, lwzux, lhbrx, lwbrx. 2 7 1 ldst no fixed-point store instructions: stb, stbu, stbx, stbux, sth, sthu, sthx, sthux, stw, stwu, stwbrx, stwx, stwux, sthbrx 1 8 1 ldst no fixed-point load and store multiple instructions: lmw, smw serialize + 1 + number of registers serialize + 1 + number of registers ldst yes synchronize: sync serialize + 1 serialize + 1 ldst yes storage synchronization instructions: lwarx, stwcx. serialize + 2 serialize + 2 ldst yes move condition register from xer: mcrxr serialize + 1 serialize + 1 ldst yes (before) table 8-1. instruction execution timing (continued) instructions latency blockage execution unit serializing instruction
instruction execution timing motorola mpc801 user? manual 8-3 8 move to / from special-purpose register mtspr, mfspr serialize + 1 serialize + 1 ldst yes (before) string instructions: lswi, lswx, stswi, stswx serialize + 1 + number of words accessed serialize + 1 + number of words accessed ldst yes storage control instructions: isync serialize serialize branch yes order storage access: eieio 1 1 ldst next load or store is synchronized relative to all prior load or store cache control: icbi 1 1 ldst, i-cache no notes: 1. see table 6-11 for more information. 2. refer to section 6.3.1 the control registers . 3. see table 6-10. 4. where: 5. 6. blocking the multiply instruction is dependent on the subsequent instruction. for any subsequent multiply instruction, the blockage is 1 clock and for any subsequent divide it is 2 clocks. 7. assuming nonspeculative aligned access, on-chip memory, and available bus. for details, refer to section 6.5.5 nonspeculative load instructions , section 6.5.6 executing unaligned instructions , and section 6.5.9 instruction timing . 8. although a store (as well as mtspr for special registers external to the core) issued to the load/store unit buffer frees the core pipeline, the next load or store will not actually be performed on the bus until the bus is free. table 8-1. instruction execution timing (continued) instructions latency blockage execution unit serializing instruction divisionlatency nooverflow 3 34 divisorlength 4 ------------------------------------------------------ + overflow 2 ----------------------------------------------------------------------------------------------------------------------- - = overflow x 0 -- - or maxnegativenumber 1 -------------------------------------------------------------- - = divisionblockage divisionlatency =
instruction execution timing 8-4 mpc801 user? manual motorola 8 8.1 instruction execution timing examples all examples assume an instruction cache hit. 8.1.1 data cache load lwz r12,64 (sp) sub r3,r12,3 addic r4,r14,1 mulli r5,r3,3 addi r4,3(r0) figure 8-1. example of a data cache load this is an example from a data cache with zero wait states. the sub instruction is dependent on the value loaded by the load to r12. this causes a bubble to occur in the instruction stream as shown in the execute line. refer to section 8.1.2.2 private writeback bus dedicated for load for instances in which no such dependency exists. load sub mulli addi addic fetch decode read + execute writeback l address drive l data load write back load sub bubble add addic load sub sub addic ld ld ld
instruction execution timing motorola mpc801 user? manual 8-5 8 8.1.2 writeback 8.1.2.1 writeback arbitration mulli r12,r4,3 sub r3,r15,3 addic r4,r12,1 figure 8-2. example of a writeback arbitration the addic instruction is dependent on the mulli result. since the single-cycle instruction sub has priority on the writeback bus over the mulli and the mulli writeback is delayed one clock and causes a bubble in the execute stream. mulli r12,r4,3 sub r3,r15,3 addic r4,r3,1 figure 8-3. another example of a writeback arbitration in this example, the addic instruction is dependent on the sub rather than on the mulli . although the writeback of the mulli is delayed two clocks, there is no bubble in the execution stream. mulli sub addic fetch decode read + execute writeback mulli sub bubble add addic mulli sub, mulli mul addic sub mulli sub addic fetch decode read + execute writeback mulli sub add addic mulli sub, mulli mul addic sub
instruction execution timing 8-6 mpc801 user? manual motorola 8 8.1.2.2 private writeback bus dedicated for load lwz r12,64 (sp) sub r5,r5,3 cror 4,14,1 and r3,r4.r5 xor r4,r3,r5 or r6,r12.r3 figure 8-4. example of a private writeback bus load the load and the xor writeback in the same clock since they use the writeback bus in two different ticks. ori xor load load sub and xor cror ori sub and cror ori load sub ld ld ld ld ld sub load cror cr and and xor xor ori ext clock int clock e data fetch decode read + execute writeback l address drive l data cache address load writeback e address
instruction execution timing motorola mpc801 user? manual 8-7 8 8.1.3 fastest external load (data cache miss) lwz r12,64 (sp) sub r3,r12,3 addic r4,r14,1 figure 8-5. example of an external load the sub instruction is dependent on the value read by the load. it causes three bubbles in the instruction execution stream. the external clock is shifted 90 ? relative to the internal clock. sub load load sub addic sub sub load bubble ld ld ld ld ld load ext clock int clock e data fetch decode read + execute writeback l address drive l data cache address load writeback e address bubble bubble bubble
instruction execution timing 8-8 mpc801 user? manual motorola 8 8.1.4 a full history buffer lwz r12,64 (sp) sub r5,r5,3 addic r4,r14,1 and r3,r4.r5 xor r4,r3,r5 ori r7,r8,1 figure 8-6. example of a full history buffer this example demonstrates the condition of a full history buffer. in this case, the history buffer is full from executing the load , sub , add , and and instructions. it takes one more bubble from the load writeback to allow further issue. this is the time for the history buffer to retire load , sub , add , and and . xor xor load load sub and xor addic ori sub and addic xor load sub ld ld ld ld ld sub load addic ad and and bubble ext clock int clock e data fetch decode read + execute writeback l address drive l data cache address load writeback e address bubble
instruction execution timing motorola mpc801 user? manual 8-9 8 8.1.5 branch folding lwz r12,64 (sp) sub r3,r12,3 addic r4,r14,1 bl func ... func: mulli r5,r3,3 addi r4,3(r0) figure 8-7. example of branch folding the lwz instruction accesses the internal storage with one wait state. the instruction prefetch queue and parallel operation of the branch unit allows the two bubbles caused by the bl issue and execution to overlap the two bubbles caused by the load. the issue of the branch itself is referred to as a bubble since no actual work is done by a branch. addic load load sub bl bubble addic mulli sub sub bubble mulli load bubble ld ld bl ld bl sub addic add mulli fetch decode read + execute writeback l address drive l data load writeback branch decode branch execute addi
instruction execution timing 8-10 mpc801 user? manual motorola 8 8.1.6 branch prediction while: mulli r3,r12,r4 addi r4,3(r0) ... lwz r12,64 (r2) cmpi 0,r12,3 addic r6,r5,1 blt cr0,while ... figure 8-8. example of branch prediction in this example, the blt instruction is dependent on the cmpi instruction. nevertheless, the branch unit predicts the correct path and allows an overlap of its bubbles with those of lwz . when the cmpi writes back, the branch unit reevaluates the decision and if correct prediction occurs no more action is taken and execution continues fluently. the fetched instructions on the predicted path are not allowed to execute before the condition is finally resolved. instead, they are stacked in the instruction prefetch queue. addic load load cmpi blt bubble addic mulli cmpi cmpi bubble mulli load bubble ld ld blt ld blt cmp addic add mulli fetch decode read + execute writeback l address drive l data load writeback branch decode branch execute addi branch final decision blt
motorola mpc801 user? manual 9-1 9 section 9 instruction cache the mpc801 instruction cache is a 2k two-way, set-associative cache. it is organized into 64 sets at two lines per set and four words per line. cache lines are aligned on 4-word boundaries in memory. the cache access cycle begins with an instruction request from the instruction unit in the core. if a cache hit occurs, the instruction is delivered to the instruction unit and if a cache miss occurs, the cache initiates a burst read cycle on the internal bus with the address of the requested instruction. the first word received from the bus is considered the requested instruction. the cache forwards this instruction to the instruction unit of the core as soon as it is received from the internal bus. a cache line is then selected to receive the data that will be coming from the bus. a least recently used (lru) replacement algorithm is used to select a line when no empty lines are available. each cache line can be used as an sram, thus allowing the application to lock critical code segments that need fast and deterministic execution time. instruction cache coherency in a multiprocessor environment is maintained by the software and supported by a fast hardware invalidation capability. figure 9-1 illustrates a block diagram view of the cache organization and figure 9-2 a view of the cache? data path. 9.1 features the following is a list of the instruction cache? main features: 2k two-way, set-associative at four words per line adheres to the lru replacement policy parked on the internal bus lockable sram ?ritical word first? burst access responds to stream hit, which allows fetching from the burst buffer and of the word currently on the internal bus. serves the core request in parallel to bringing the tail of the previously missed line
instruction cache 9-2 mpc801 user? manual motorola 9 figure 9-1. instruction cache organization cache control supports cache inhibit efficiently uses the pipeline of the internal bus by initiating a new burst cycle while bringing the tail of the previously missed line into the cache from memory performance enhanced for cache-inhibited regions by fetching a full line to the internal burst buffer. instructions stored in the burst buffer and those originated in a cache-inhibited region are only used once before being refetched. comp way0 28 29 27 21 20 0 word select bidirectional mux 2 -> 1 hit0 hit instruction pointer . . . . . . . . set0 set1 set127 set126 comp tag0 w0 w1 w2 w3 valid bit lock bit tag1 w0 w1 w2 w3 tag127 w0 w1 w2 w3 tag126 w0 w1 w2 w3 . . . . . . . . . . . . l r u a r r a y . . . . . . . . hit1 to line buffer/ from burst buffer 2 w2 tag0 w0 w1 w2 w3 way1 tag1 w0 w1 w2 w3 tag127 w0 w1 w2 w3 tag126 w0 w1 w2 w3 . . . . . . . . . . . . valid bit lock bit w2 mmu 7 21 21 128 128 21 128
instruction cache motorola mpc801 user? manual 9-3 9 instruction unit request has priority over a burst buffer write to an array, thus increasing the overall core performance miss latency is reduced by sending addresses to the cache and internal bus simultaneously and aborting when a hit before a cycle goes external minimum operational power consumption tags and all their attributes and data arrays have read/write capability special support is available when the mpc801 processor is in debug mode. figure 9-2. cache data path block diagram 4 words line buffer instruction internal bus data 4-kbyte set address [21:27] 4 address [28:29] cache array decoder 128 32 words burst buffer 128 128 128 stream hit mux 2->1 word select mux 4->1 128 data bypass mux 2->1 32 32 to core
instruction cache 9-4 mpc801 user? manual motorola 9 9.2 programming the instruction cache the instruction cache programming model implements specific operations. all powerpc special registers can be accessed via the mfspr and mtspr instructions. three of these special-purpose registers are used to control the instruction cache: instruction cache control and status register (ic_cst) instruction cache address register (ic_adr) instruction cache data port register (read-only) (ic_dat) these registers are privileged and any attempt to access them while the core is in the problem state (msr pr =1) results in a program interrupt. 9.2.1 instruction cache control and status register reset value is 0x00000000. ien?nstruction cache enable status this bit is read-only. any attempt to write it is ignored. it reflects the state of the instruction cache. 0 = instruction cache is disabled. 1 = instruction cache is enabled. bits 1?, 7?, and 13?1?eserved these bits are reserved and should be set to 0. cmd?nstruction cache commands reading these bits always delivers a 0. 000 = reserved. 001 = cache enable. 010 = cache disable. 011 = load & lock. 100 = unlock line. 101 = unlock all. 110 = invalidate all. 111 = reserved. ic_cst bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ien reserved cmd reserved ccer1 ccer2 ccer3 reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved
instruction cache motorola mpc801 user? manual 9-5 9 ccer1?nstruction cache error type 1 these bits are sticky and set by the hardware. they are read-only and cleared when read. 0 = no error. 1 = error. ccer2?nstruction cache error type 2 these bits are sticky and set by the hardware. they are read-only and cleared when read. 0 = no error. 1 = error. ccer3?nstruction cache error type 3 these bits are sticky and set by the hardware. they are read-only and cleared when read. 0 = no error. 1 = error. 9.2.2 instruction cache address register this register is used to read and write arrays for debug and load & lock. adr?ddress these bits represent the address to be used in the command programmed in the command and status register. reset value is undefined. ic_adr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field adr bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field adr
instruction cache 9-6 mpc801 user? manual motorola 9 9.2.3 instruction cache data port register this register is used to read and write arrays for debug and load & lock. dat?ata these bits represent the data received when reading information from the instruction cache. reset value is undefined. 9.3 how the instruction cache works on an instruction fetch, bits 21-27 of the instruction? address point into the cache to retrieve the tags and data of one set. the tags from both ways are then compared against bits 0-20 of the instruction? address. if a match is found and the matched entry is valid, then it is a cache hit. if neither tags match or the matched tag is not valid, it is a cache miss. the instruction cache includes one burst buffer that holds the last line received from the bus and one line buffer that holds the last line retrieved from the cache array. if the requested data is found in one of these buffers, it can also be considered a cache hit. refer to figure 9-2 for more information. to minimize power consumption, the instruction cache tries to make use of data stored in one of its internal buffers. using a special indication from the core, it is possible to make sure that the requested data is in one of the buffers early enough that the cache array is not activated. 9.3.1 instruction cache hit when a cache hit occurs, bits 28-29 of the instruction address are used to select one word from the cache line whose tag matches bits 0?0 of the instruction? address. the instruction is then immediately transferred to the instruction unit of the core. 9.3.2 instruction cache miss when an instruction cache miss occurs, the address of the missed instruction is driven onto the internal bus with a 4-word burst transfer read request. a cache line is then selected to receive the data which will be coming from the bus. the selection algorithm gives first priority to invalid lines. if neither of the two lines in the selected set are invalid, then the least recently used line is selected for replacement. locked lines are never replaced. the transfer begins with the word requested by the instruction unit (critical word first), followed by the remaining words (if any) of the line, then by the word at the beginning of the lines (wraparound). ic_dat bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field dat bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field dat
instruction cache motorola mpc801 user? manual 9-7 9 when the missed instruction is received from the bus, it is immediately delivered to the instruction unit and also written to the burst buffer. as subsequent instructions are received from the bus, they are written into the burst buffer and delivered to the instruction unit (stream hit) either directly from the bus or from the burst buffer. when the line resides in the burst buffer, it is written to the cache array as long as it is not busy with an instruction unit request. if a bus error is encountered on the access to the requested instruction, then a machine check interrupt is taken. if a bus error occurs on any access to other words in the line, then the burst buffer is marked invalid and the line is not written to the array. however, if no bus error is encountered, the burst buffer is marked valid and eventually written to the array. the page is marked noncacheable in the memory management unit. the line is only written to the burst buffer and not to the cache. instructions that are stored in the burst buffer and originate in a cache-inhibited memory region, are only used once before they are refetched. refer to section 9.4.7 instruction cache read for more information. 9.3.3 instruction fetch on a predicted path the core allows branch prediction so branches can issue as early as possible. this mechanism allows instruction prefetch to continue while an unresolved branch is being computed and the condition is being evaluated. instructions fetched after unresolved branches are considered fetched on a predicted path. these instructions may be discarded later if it turns out that the machine has followed the wrong path. to minimize power consumption, the mpc801 instruction cache does not initiate a miss sequence when the instruction is inside a predicted path. the mpc801 instruction cache evaluates fetch requests to see if they are inside a predicted path and if a hit is detected, the requested data is delivered to the core. however, if a cache miss is detected, the miss sequence is usually not initiated until the core finishes branch evaluation. 9.4 instruction cache commands the mpc801 instruction cache supports the powerpc invalidate instruction with some additional commands that help control the cache and debug the information stored in it. the additional commands are implemented using the three special-purpose control registers mentioned previously in section 9.2 programming the instruction cache . most of the commands are executed immediately after the control register is written and unable to generate any errors. therefore, when executing these commands there is no need to check the error status in the ic_cst register. some commands may take some time to generate errors. in the current implementation, load & lock is the only command this applies to. therefore, when executing these commands, you must insert an isync instruction immediately after the instruction cache command and check the error status in the ic_cst register after the isync . the error type bits in the ic_cst register are sticky, thus allowing you to perform a series of instruction cache commands before checking the termination status. these bits are set by the hardware and cleared by the software.
instruction cache 9-8 mpc801 user? manual motorola 9 only commands that are not immediately executed need to be followed by an isync instruction for the hardware to perform them correctly. however, all commands need to be followed by an isync to make sure all instruction fetches that are after the instruction cache command in the program stream are affected by the instruction cache command. when the instruction cache is executing a command it is busy, so it stops any treatment of core requests. this eventually results in a machine stall. 9.4.1 instruction cache block invalidate the mpc801 implements the icbi instruction as if it only pertains to the mpc801 instruction cache. this instruction does not broadcast on the external bus and the mpc801 does not snoop this instruction if it is broadcasted by other masters. this command is not privileged and has no associated error cases. the instruction cache performs this instruction in one clock cycle. to accurately calculate the latency of this instruction, bus latency should be taken into consideration. 9.4.2 invalidate all instruction cache the invalidate all instruction cache operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. when it is invoked and msr pr =0, all valid lines in the cache, except the lines that are locked, become invalid. as a result of this command, the lines?lru points to an unlocked way or to way 0 if both lines are unlocked. this last feature is useful when initializing the instruction cache out of reset. for more information, refer to section 9.8 reset sequence . to invalidate the whole cache, set the invalidate all command in the ic_cst register. this command has no associated error cases. the instruction cache performs this instruction in one clock cycle. to accurately calculate the latency of this instruction, you should consider bus latency. 9.4.3 load & lock load & lock is used to lock critical code segments in the instruction cache. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. load & lock is performed on a cache line granularity and after a line is locked, it operates as a regular instruction sram. it is not replaced during misses and it is not affected by invalidate commands. the hardware correct operation depends on the software to follow the exact steps mentioned in section 9.7 updating code and memory region attributes . to load and lock a line, follow these steps: 1. read the error type bits in the ic_cst register to clear them. 2. write the address of the line to be locked to the ic_adr. 3. set the load & lock command in the ic_cst register. 4. execute the isync instruction. 5. return to step 2 to load & lock more lines. 6. read the error type bits in the ic_cst register to determine if the operation completed properly.
instruction cache motorola mpc801 user? manual 9-9 9 after the load & lock command is written to the ic_cst register, the cache checks to see if the line containing the byte addressed by the ic_adr is in the cache. if it is a hit, the line is locked and the command terminates with no exception. if it is not, a regular miss sequence is initiated. after the whole line is placed in the cache, the line is locked. you must check the error type bits in the ic_cst register to determine if the load & lock operation completed properly. keep in mind that the load & lock command can generate two types of errors: type 1? bus error occurs in one of the cycles that fetched the line. type 2?here is no place to lock. it is your responsibility to make sure that there is at least one unlocked way in the appropriate set. 9.4.4 unlock line unlock line is used to unlock previously locked cache lines. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. unlock line is performed on a cache line granularity. if the line is found in the cache it is considered a hit, so it is unlocked and operates as a regular valid cache line. if the line is not found in the cache it is considered a miss, so there is no operation and the command terminates without an exception. to unlock a line, follow these steps: 1. write the address of the line to be unlocked into the ic_adr. 2. set the unlock line command in the ic_cst register. this command has no error cases that you need to check. the instruction cache performs this instruction in one clock cycle. to accurately calculate the latency of this instruction, you should consider bus latency. 9.4.5 unlock all unlock all is used to unlock the entire cache. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. it is performed on all cache lines. if a line is locked, it is unlocked and operates as a regular valid cache line. if a line is not locked or if it is invalid, no operation occurs. to unlock the whole cache, set the unlock all command in the ic_cst register. this command has no associated error cases. the instruction cache performs this instruction in one clock cycle. to accurately calculate the latency of this instruction, you should consider bus latency. 9.4.6 instruction cache inhibit two levels of cache inhibit are supported by the mpc801?s a cache mode of operation and on memory regions supported by the memory management unit. to disable the instruction cache, set the cache disable command in the ic_cst register. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. this command has no error cases that you need to check.
instruction cache 9-10 mpc801 user? manual motorola 9 to enable the instruction cache, set the cache enable command in the ic_cst register. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. this command has no error cases that you need to check. when fetching from cache-inhibited regions the full line is brought to the internal burst buffer. instructions that originate in a cache-inhibited region are stored in the burst buffer and can be sent to the mpc801 core no more than once before being refetched. in the memory management unit, you can program a memory region to be cache-inhibited. when doing so, you must unlock all previously locked lines containing code that originated in this memory region, invalidate all lines containing code that originated in this memory region, and execute an isync instruction. note failure to follow these steps causes code from cache-inhibited regions to be left inside the cache and any reference to these regions will result in a cache hit. if a reference to a cache-inhibited region results in a cache hit, the data is sent to the core from the cache and not from memory. when the mpc801 asserts the freeze signal, it indicates that the mpc801 is under debug and all fetches from the cache are treated as if they were from the cache-inhibited memory region. for more information on cache debug support, refer to section 9.9 debug support . 9.4.7 instruction cache read the mpc801 allows you to read all data stored in the instruction cache, including the content of the tags array. however, this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1) a program interrupt will occur. to read the data stored in the instruction cache, follow these steps: 1. write the address of the data to be read to the ic_adr register. you can also read this register for debugging purposes. 2. read the ic_dat register. so that it can access all parts of the instruction cache, the ic_adr register is divided into the fields shown in table 9-4. table 9-1. ic_adr bits functionality for the cache read command 0-17 18 19 20 21-27 28-29 30-31 reserved 0 - tag 1 - data 0 - way 0 1 - way 1 reserved set select word select (used only for data array) reserved
instruction cache motorola mpc801 user? manual 9-11 9 when read from the data array, the 32 bits of the word selected by the ic_adr register is placed in the targeted general-purpose register. when read from the tag array, the 21 bits of the tag and related information that is selected by the ic_adr are all placed in the targeted general-purpose register. the following table provides the bit layout of the instruction cache data register when reading a tag. 9.4.8 instruction cache write instruction cache write is only enabled when the mpc801 is in test mode. 9.5 restrictions zero wait state devices that are placed on the internal bus are considered to be in the cache-inhibited memory region and the hardware correct operation depends on the software to follow the exact steps mentioned in section 9.7 updating code and memory region attributes . it is not advisable to perform load & lock from zero wait state devices that are placed on the internal bus, especially since it is not guaranteed that the data will be fetched from the instruction cache. in most cases, it is fetched from the device, but found in the instruction cache. 9.6 instruction cache coherency cache coherency in a multiprocessor environment is maintained by the software and supported by the invalidation mechanism that is described above. all instruction storage is considered to be in memory coherence not required mode. 9.7 updating code and memory region attributes to update the code or change the programming of the memory regions in the chip-select logic, follow these steps: 1. update the code and change the memory region programming in the chip-select logic. 2. execute the sync instruction to ensure that the update/change operation has finished. 3. unlock all locked lines that contain updated code. 4. invalidate all lines that contain updated code. 5. execute the isync instruction. table 9-2. ic_dat bit layout when reading a tag 0-21 22 23 24 25-31 tag value 0 - not valid 1 - valid 0 - not locked 1 - locked lru bit reserved
instruction cache 9-12 mpc801 user? manual motorola 9 9.8 reset sequence to simplify the debug task of the system, the instruction cache is only disabled during hardware reset (ic_cst en = 0). this feature enables you to investigate the exact state of the instruction cache prior to the event that asserts the reset. to ensure proper operation of the instruction cache after reset, the unlock all, invalidate all, and instruction cache enable commands must be issued. 9.9 debug support the mpc801 can be debugged either in debug mode or by a software monitor debugger. in both cases, the core asserts the internal freeze signal. when freeze is asserted the instruction cache treats all misses as if they were from cache-inhibited regions and, assuming the debug routine is not in the instruction cache, the cache state remains exactly the same. when freeze is asserted, hits are still read from the array and the lru bits are updated. therefore, in the simple case of the debug routine (if it is not already in the instruction cache) it is read from memory like any other miss. for performance reasons, you may prefer to run the debug routine from the cache by following these steps: 1. save both ways of the sets that are needed for the debug routine by reading the tag value, lru bit value, valid bit value, and lock bit value. 2. unlock the locked ways in the selected sets. 3. use load & lock to load and lock the debug routine into the instruction cache. load & lock operates the same when freeze is asserted. 4. run the debug routine. all accesses to it will result in hits. after the debug routine has completed, the old state of the instruction cache can be restored by following these steps: 1. unlock and invalidate all the sets that are used by the debug routine (both ways). 2. use load & lock to restore the old sets. 3. unlock the ways that were not previously locked. 4. to restore the old state of the lru make sure the last access is made in the mru way. an access in this description is either load & lock or unlock. 9.9.1 fetching instructions from the development port when the mpc801 is in debug mode, all instructions are fetched from the development port, regardless of the address generated by the core. therefore, the instruction cache is bypassed when the mpc801 is in debug mode.
motorola mpc801 user? manual 10-1 10 section 10 data cache the mpc801 data cache is a 1k two-way, set-associative cache. it is organized into 32 sets at two lines per set and four words per line. cache lines are aligned on 4-word boundaries in memory. two state bits are included in each cache line and implement invalid, modified-valid, and unmodified-valid states of the data cache. cache coherency in a multiprocessor environment is maintained by the software and supported by a fast hardware invalidation capability. the cache is designed for both writeback and writethrough modes of operation and a least recently used (lru) replacement algorithm is used to select a line when no empty lines are available. 10.1 features the following is a list of the data cache? main features: 1k two-way, set-associative, and physically addressed single-cycle cache access on hit and one clock latency added for miss four word line size ?ritical word first?and four word burst line fill lru replacement policy 32-bit interface to load/store unit one-word write buffer lockable online granularity copyback/writethrough operation is programmed per memory management unit page coherency is only maintained by the software and no snoop is supported cache operation is blocked under miss, until the critical word is delivered to the core hit under miss operation full data cache powerpc control operations implementation specific single operation
data cache 10-2 mpc801 user? manual motorola 10 10.2 organization of the data cache the data cache is a 1k two-way, set associative, physically addressed cache that has a 16-byte line and 32-bit data path to and from the load/store unit, which allows for a 4-byte transfer per cycle. figure 10-1. data cache organization comp way0 28 31 27 21 20 0 byte select bidirectional mux 2 -> 1 hit0 hit effective address . . . . . . . . set0 set1 set127 set126 comp tag0 w0 w1 w2 w3 valid bit lock bit tag1 w0 w1 w2 w3 tag127 w0 w1 w2 w3 tag126 w0 w1 w2 w3 . . . . . . . . . . . . l r u a r r a y . . . . . . . . hit1 to/from line buffer/ burst buffer 4 w2 tag0 w0 w1 w2 w3 way1 tag1 w0 w1 w2 w3 tag127 w0 w1 w2 w3 tag126 w0 w1 w2 w3 . . . . . . . . . . . . valid bit lock bit w2 mmu 7 21 21 128 128 21 128 dirty bit dirty bit
data cache motorola mpc801 user? manual 10-3 10 10.3 programming the data cache 10.3.1 powerpc architecture instructions the following powerpc instructions are supported by the data cache. 10.3.1.1 p ower pc user instruction set architecture the data cache supports the sync instruction using a cache pipe clean indication to the core. 10.3.1.2 p ower pc virtual environment architecture the data cache supports the following instructions: data cache block flush ( dcbf ) data cache block store ( dcbst ) data cache block touch ( dcbt ) data cache block touch for store ( dcbtst ) data cache block set to zero ( dcbz ) 10.3.1.3 p ower pc operating environment architecture the data cache also supports the data cache block invalidate ( dcbi ) instruction. 10.3.2 implementation specific operations the mpc801 data cache includes some extended features in addition to those in the powerpc architecture. the following are implementation specific operations supported by the mpc801 data cache: block lock block unlock invalidate all unlock all flush cache line read tags read registers 10.3.3 special registers of the data cache the powerpc special registers are accessed via the mtspr and mfspr instructions. the following registers are used to control the data cache: data cache control and status register (dc_cst) data cache address register (dc_adr) data cache data register (dc_dat)
data cache 10-4 mpc801 user? manual motorola 10 these registers are privileged and if you try to access them while the core is in the problem state (msr pr =1) a program interrupt will occur. 10.3.3.1 data cache control and status register den?ata cache enable status this bit is read-only and any attempt to write to it is ignored. it reflects the state of the data cache. 0 = data cache is disabled. 1 = data cache is enabled. dfwt?ata cache force writethrough this bit is read-only and any attempt to write to it is ignored. it reflects the state of the data cache. 0 = data cache mode determined by the memory management unit. 1 = data cache is forced writethrough. les?ittle-endian swap this bit is a read-only bit and any attempt to write to it is ignored. refer to section 14 endian modes for details about how this bit is used to achieve the required endian behavior. 0 = address of the data and the instruction caches is the unchanged address from the core. no byte swap is done on the data and instruction caches?external accesses. 1 = address munging performed by the core is reversed before accessing the data cache, the instruction cache and storage. byte swap is performed for the instruction and data cache? external accesses. bits 3, 8, and 9?eserved these bits are reserved and should be set to 0. dc_cst bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field den dfwt les res cmd reserved ccer 1 ccer 2 ccer 3 reserved reset 0000 0 000 r/w rr bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved
data cache motorola mpc801 user? manual 10-5 10 cmd?ata cache commands 0000 = reserved. 0010 = data cache enable. 0100 = data cache disable. 0110 = lock line. 1000 = unlock line. 1010 = unlock all. 1100 = invalidate all. 1110 = flush data cache line. 0001 = set force writethrough mode. 0011 = clear force writethrough mode. 0101 = set little-endian swap mode. 0111 = clear little-endian swap mode. others = reserved. ccer1?ata cache error type 1 these bits are sticky and set by the hardware. they are read-only and are cleared when they are read. 0 = no error. 1 = error. ccer2?ata cache error type 2 these bits are sticky and set by the hardware. they are read-only and are cleared when they are read. 0 = no error. 1 = error. ccer3?ata cache error type 3 these bits are sticky and set by the hardware. they are read-only and are cleared when they are read. 0 = no error. 1 = error. bits 13?1?eserved these bits are reserved and should be set to 0.
data cache 10-6 mpc801 user? manual motorola 10 10.3.3.2 data cache address register adr?ddress these bits represent the address to be used in the command programmed in the dc_cst register. it is also the internal address used to read tags and registers. 10.3.3.3 reading the cache structures to read the data stored in the data cache tags or registers, follow these steps: 1. write to the dc_adr. you can also read this register for debugging purposes. 2. read the dc_dat register. the dc_adr register is divided into the following fields when the internal parts of the data cache are read. the register number field specifies the register to be read. the following registers and their encoding are supported: ? 00?opyback data register 0 ? 01?opyback data register 1 ? 02?opyback data register 2 ? 03?opyback data register 3 ? 04?opyback address register dc_adr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field adr bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field adr table 10-1. dc_adr bit functionality for reading the cache 0-17 18 19 20 21-27 28-31 reserved 0- tags 0 - way 0 1 - way 1 reserved set number reserved 1- registers reserved register number reserved
data cache motorola mpc801 user? manual 10-7 10 10.3.3.4 data cache data register when reading from the data cache data (dc_dat) register, the 21 bits of the tag and related information that is selected by the dc_adr are placed in the targeted general-purpose register. the following table illustrates the dc_dat register? bit layout when reading a tag. writing to dc_dat is illegal. a write to dc_dat results in an undefined data cache state. 10.4 operating the data cache the data cache is a three-state design. two bits are included in each cache line to maintain the line? state information. the status bits keep track of whether or not the line is valid or if it has been modified relative to memory. these states are invalid, modified-valid, and unmodified-valid. 10.4.1 data cache read the cache read operation consists of the following items: read hit?n a cache hit, the requested word is immediately transferred to the load/store unit and the lru state of the set is updated. no state transition occurs and the access time is 1 clock. read miss? line in the cache is selected to hold the data that will be fetched from memory. the selection algorithm gives first priority to invalid lines and if both lines are invalid, way ?ero?line is selected first. if neither of the two candidate lines in the selected set is invalid, then one of the lines is selected by the lru algorithm for replacement. if the selected line is valid-modified (dirty), then it is kept in a special buffer to be written out (flushed) to memory or a later time. subsequently, the address of the missed entry is sent to the system interface unit with a request to retrieve the cache line. the system interface unit arbitrates for the bus and initiates a 4-word burst transfer read request. the transfer begins with the aligned word containing the missed data, followed by the remaining word in the line, then by the word at the beginning of the line (wraparound). as the missed word is received from the bus, it is delivered (forwarded) directly to the load/store unit. when the line has been fully received, it is written into the cache. the data cache supports further requests as long as they hit in the cache immediately after the arrival of the critical word. after the line with the requested data has been brought from memory, the dirty line kept in the buffer is sent to the system interface unit to be written out (flushed) to memory. if a bus error is detected during the fetch of the missed ?ritical word? a machine check interrupt is generated. if a bus error occurs on any other word in the line transfer, the line is marked invalid. table 10-2. dc_dat bit layout for reading a tag 0-22 23 24 25 26 27-31 tag value 0 - not locked 1 - locked lru bit of this set 0 - clean 1 - dirty 0 - not valid 1 - valid reserved
data cache 10-8 mpc801 user? manual motorola 10 on the other hand, if no bus error is encountered, the cache line is marked unmodified-valid. if a bus error is detected during the dirty line flush, a machine check interrupt is generated. for more information about reading the address and data of a line, see section 10.5.5 reading the data cache structures . 10.4.2 data cache write the cache operates in either writethrough or copyback mode, depending on how the memory management unit is programmed. if two logical blocks map to the same physical block, it is considered a programming error for them to specify different cache write policies. 10.4.2.1 copyback mode in copyback mode, write operations do not necessarily update the external memory. for this reason, the copyback mode is the preferred mode of operation when it is important to keep bus bandwidth usage and power consumption to a minimum. data cache operation on a write to copyback line is as follows: write hit to modified line?ata is simply written into the cache with no state transition. the lru of the set is updated to point to the way holding the hit data. write hit to unmodified line?ata is written into the cache and the line is marked modified. the lru of the set is updated to point to the way holding the hit data. write miss? line in the cache is selected to hold the data that is fetched from memory. the selection algorithm gives first priority to invalid lines if both lines are invalid way ?ero?line is selected first. if neither of the two candidate lines in the selected set is invalid, then one of the lines is selected by the lru algorithm for replacement. if the selected line is valid-modified (dirty), it is kept in a special buffer to be written out (flushed) to memory at a later time. subsequently, the address of the missed entry is sent to the system interface unit with a request to retrieve the cache line. the system interface unit arbitrates for the bus and initiates a 4-word burst transfer read request. the transfer begins with the aligned word containing the missed data (the critical word first), followed by the remaining word in the line, then by the word at the beginning of the line (wraparound). as the missed word is received from the bus, it is merged with the data to be written. when the line has been fully received, it is written into the cache. once the line fill is complete, the new store data is written into the cache and the line is marked modified-valid (dirty). at this point, if the machine stalls while waiting for the store to complete, execution is allowed to resume. the data cache does not support further requests until after the whole line arrives. after the line with the requested data has been brought from memory, the dirty line kept in the buffer is sent to the system interface unit to be written out (flushed) to memory. the data cache can support further requests as long as they hit in the cache while flushing the dirty line to memory. if a bus error is detected during a fetch of the missed line the cache line is not modified and a machine check interrupt is generated. if a bus error is detected during the dirty line flush, a machine check interrupt is generated. for more information about reading the address and data of a line, see section 10.3.3.3 reading the cache structures .
data cache motorola mpc801 user? manual 10-9 10 10.4.2.2 writethrough mode in writethrough mode, store operations always update memory. use this mode when external memory and internal cache images must agree. it gives a lower worst-case interrupt latency at the expense of average performance. data cache operation on a write to writethrough line is as follows: write hit?ata is written into both the cache and memory, but the cache state is not changed. the lru of the set is updated to point to the way holding the hit data. if a bus error is detected during the write cycle, the cache is still updated and a machine check interrupt is generated. write miss data is only written into memory, not to the cache (write no allocate) and no state transition occurs. the lru is not changed, but if a bus error is detected during the write cycle, a machine check interrupt is generated. 10.4.3 data cache-inhibited accesses if the cache access is to a page that has the ci bit set in the memory management unit, one of the following actions are performed: hit to modified or unmodified line this is considered a programming error if the targeted location copy of a load , store , or dcbz instruction to cache inhibit storage is found in the cache. the result is boundedly undefined. read miss?ata is read from memory, but not placed in the cache. the cache? status is unaffected. write miss data is written through to memory, but not placed in the cache. the cache? status is unaffected. 10.4.4 data cache freeze the mpc801 can be debugged either in debug mode or by a software monitor debugger. in both cases, the core asserts the internal freeze signal. for a detailed description of mpc801 debug support, refer to section 18 development support . when freeze is asserted, the data cache will behave as follows: read miss data is read from memory, but not placed in the cache. the cache? status is unaffected. read hit data is read from the cache, but lru is not updated. write miss/hit data cache operates in writethrough mode, but lru is not updated. dcbz instruction miss/hit?ata is written into cache and memory, but lru is not updated. dcbst / dcbf / dcbi instructions the data cache and memory is updated according to the powerpc architecture, but lru is not updated.
data cache 10-10 mpc801 user? manual motorola 10 10.4.5 data cache coherency the mpc801 data cache provides no support for snooping external bus activity. all coherency between the internal caches and memory/devices external to the extended core must be controlled by the software. in addition, there is no mechanism provided for dma or other internal masters to access the data cache directly. 10.5 controlling the data cache 10.5.1 flushing and invalidating the mpc801 allows the software to explicitly flush and/or invalidate entries in the data cache. the data cache can be invalidated by writing unlock all and invalidate all commands to the dc_cst register. the data cache is not automatically invalidated on reset. it must be invalidated under software control. the data cache can be flushed by a software loop using the dcbst or dcbf instructions or the implementation-specific data cache flush cache line command. notice that the powerpc architecture instructions flush a line indexed by the address it represents, while the implementation-specific command indexes a line by its physical location within the data cache. when flushing must be restricted to a specific memory area or the architecture must be compliant, using the powerpc architecture instructions is recommended. however, if the entire data cache must be flushed and there is no concern for compatibility, the implementation-specific command is more efficient. if a bus error occurs while executing the dcbf and dcbst instructions or the flush cache line implementation-specific command, the data of the cache line specified by these operations must be retrieved from the copyback data register rather than from the data cache array. 10.5.2 disabling the data cache can be enabled or disabled by using data cache enable and data cache disable written to the dc_cst register. in the disabled state, the cache tag state bits are ignored and all accesses are propagated to the bus as single beat transactions. the default after the reset state of the data cache is disabled. disabling the data cache does not affect the data address translation logic and translation is still controlled by the msr dr bit. any write to the dc_cst register must be preceded by a sync instruction. this prevents the data cache from being disabled or enabled in the middle of a data access. when the data cache generates an interrupt as a result of a bus error on the copyback or implementation-specific flush cache line command, it enters the disable state. operation of the cache when it is disabled is similar to cache-inhibit operation. 10.5.3 locking each line of the data cache can be independently locked by using the lock line command written to the dc_cst register, but replacement line fills are not performed to a locked line. a flush or invalidation of a locked line cache is ignored by the data cache. any write to the dc_cst register must be preceded by a sync instruction, which prevents a cache from being locked during a line fill.
data cache motorola mpc801 user? manual 10-11 10 10.5.4 storage control instructions in the data cache 10.5.4.1 dcbi, dcbst, dcbf and dcbz instructions the dcbz , dcbi , dcbst , and dcbf instructions operate on a block basis of cache line, which is 16 bytes (4 words) long. a data tlb miss exception is generated if the effective address of one of these instructions cannot be translated and data address relocation is enabled. 10.5.4.2 touch the dcbt and dcbtst instructions in the mpc801 operate on a block basis of cache line, which is 16 bytes (4 words) long. they are treated as a nonoperation if the effective address of one of these instructions cannot be translated and relocation is enabled. 10.5.4.3 storage synchronization and reservation the lwarx and stwcx instructions are implemented according to the powerpc architecture requirements. when the storage accessed by the lwarx and stwcx instructions is in cache-allowed mode, it is assumed that the system works with the single master in this storage region. therefore, if a data cache miss occurs, the access on the internal and external buses does not have a reservation attribute.the mpc801 does not cause the system data storage error handler to be invoked if the storage accessed by the lwarx and stwcx instructions is in the writethrough required mode. the mpc801 does not provide support for snooping an external bus activity outside the chip. the provision is made to cancel the reservation inside the mpc801 by using the cr and kr input pins. refer to section 13.4.9 storage reservation protocol for more information. 10.5.5 reading the data cache structures to allow debug and recovery actions, the mpc801 allows the content of the tags array as well as the last copyback address and data buffers to be read. see section 10.3.3 special registers of the data cache for details. this operation is privileged and if you try to use it when the core is in the problem state (msr pr =1), a program interrupt will occur.
data cache 10-12 mpc801 user? manual motorola 10
motorola mpc801 user? manual 11-1 11 section 11 memory management unit the mpc801 implements a virtual memory management scheme that provides cache control, storage access protection, and effective to real address translation. this implementation includes separate instruction and data memory management units. the mpc801 memory management unit (mmu) is compliant with the powerpc microprocessor family: the programming environment in relation to the supported types of attributes, except that two new modes of operation have been added: powerpc mode with extended encoding domain manager mode available protection granularity sizes are page (4k, 16k, 512k, or 8m) or 1k subpage, the latter of which is only supported by 4k pages. hereafter, the prefix m x _ that appears before an memory management unit control register name corresponds to both the mi_ and md_ conditions. 11.1 features the following is a list of the memory management unit? main features: 8-entry fully associative data and instruction translation lookaside buffers (tlbs) multiple page sizes high performance supports up to 16 virtual address spaces supports 16 access protection groups each entry can be programmed to match problem accesses, privileged accesses, or both. generates implementation specific interrupts software tablewalk update capability msr ir and msr dr control memory management unit translation and protection supports powerpc tlbie and tlbia instructions. no tlbsync instruction is supported, but it is implemented as a nop instruction. programming is accomplished by using the powerpc mtspr/mfspr instructions to or from the implementation specific special-purpose registers a special scratch register is available for software tablewalks designed for minimal power consumption
memory management unit 11-2 mpc801 user? manual motorola 11 11.2 address translation the mpc801 core generates 32-bit effective addresses and, when enabled, the memory management unit translates the effective address to a real address that is used for cache or memory access. if disabled, the effective address is passed as the real address to the memory, which bypasses the appropriate tlb. conceptually, in tables residing in the memory, the effective address is sought to provide the real address mapping and storage attributes. for performance reasons, instruction and data tlbs are implemented to hold recently used address translations. in the mpc801, the table lookup and tlb reload are performed by a software routine with little hardware assistance. this partition simplifies the hardware and gives the system the opportunity to choose the translation table structure. a tlb hit in multiple entries is avoided during the tlb reload phase. the tlb logic recognizes that the effective page number (epn) currently loaded into the tlb overlaps another epn. at least when taking into account the page sizes, subpage validity flags, problem/privileged state, address space id (asid), and the sh values of the tlb entries. when such an event occurs, the current epn is written into the tlb and the entry of the other epn is invalidated from the tlb. the mpc801 memory management unit supports a multiple virtual address space model and, when enabled, each translation is associated with an asid. for the translation to be valid, its asid must be equal to the current address space id (casid) that is in effect when an access is performed. 11.2.1 translation lookaside buffer operation the mpc801 has two translation lookaside buffers?ne for instruction fetches and one for data accesses. each of the translation lookaside buffers (tlb) contain pointers to pages in the real memory where data is indexed by the effective page number and it can hold entries with different page sizes. the entry page size controls the number of effective address bits to be compared and the number of least-significant effective address bits that remain untranslated and passes them as least-significant real address bits. for a 4k page size, four subpage validity flags are supported that allow any combination of 1k subpages to be mapped. for any other page size, all of these flags should have the same value. programming pages other than 4k pages with different valid bits is considered a programming error. the subpage validity flags can be manipulated to implement effective page sizes of 1k, 2k, 3k, 4k, or any other combination of 1k subpages. however, subpages of an effective page frame must all map to the same real page. during the translation process, the effective address, processor problem state (msr pr ), and casid are provided to the tlb. refer to figure 11-1 for more information. in the tlb, the effective address and casid are compared with the epn and asid of each entry. the casid is only compared when the matching entry was programmed as nonshared. see tables 11-11 and 11-15 for details. a successful tlb hit occurs if the incoming effective address matches the epn stored in a valid tlb entry and the casid value stored in the m_casid register matches the entry? asid field. at the same time, the subpage validity flag is set for the subpage that the incoming effective address points to. if a hit is detected, the content of the real page number is concatenated with the appropriate number of least-significant bits from the effective address to form the real address that is then sent to the cache and memory system.
memory management unit motorola mpc801 user? manual 11-3 11 11.3 protection access control is assigned on a page-by-page basis and any further manipulation is conducted on a group basis. figure 11-1. effective to real address translation for 4k pages each tlb entry holds an access protection group (apg) number. when a match is found, the value of the matched entry? apg is used to index a field in the access protection register that defines access control for the translation. the access protection register contains 16 fields. the field content is used according to the group protection mode. in the powerpc mode, each field holds the kp and ks bits of a corresponding segment register. to be consistent with the powerpc microprocessor family: the programming environment manual, the apg value should match the four most-significant bits of the effective page number. in domain manager mode, each field holds override information over the page protection setting. no override, no access override, and free access override modes are all supported. enabled translation lookaside buffer (tlb) 32-bit real address byte 12 20 page no access free access exception page protection translation msr pr implementation specific tlb miss interrupts to core implementation specific error interrupts to core logic protection group number 32-bit logical address protection lookup table 20 byte real page number 20 12 32-bit effective address casid (from m_casid) translation enabled 32-entry fully associative array
memory management unit 11-4 mpc801 user? manual motorola 11 11.4 storage attributes 11.4.1 reference and change bit updates the mpc801 does not generate an exception for an r bit update because there is no entry for an r bit in the tlb. the c bit updates are implemented by the software, but the hardware treats the c bit as a write-protect attribute. therefore, if a write is attempted to a page marked unmodified, that entry is invalidated and an implementation specific data tlb error interrupt is generated. 11.4.2 storage control each page can have different storage control attributes. the mpc801 supports ci, wt, and g attributes, but not the m attribute. a page that needs to be memory coherent must be programmed cache-inhibited. refer to the definition of these attributes in the powerpc microprocessor family: the programming environment manual. the effects of the ci and wt attributes in the mpc801 are described in section 9 instruction cache . the g attribute is used to map i/o devices that are sensitive to speculative accesses. an attempt to access a page marked guarded forces the access to stall until the access is nonspeculative or canceled by the core. fetching from a guarded storage is prohibited and attempting to do so generates an implementation specific instruction storage interrupt. when msr ir or msr dr for instruction or data address translation are negated, default attributes are used. see tables 11-6 and 11-7 for details. 11.5 translation table structure the mpc801 memory management unit includes special hardware to assist in a two-level software tablewalk. other table structures are not precluded. figures 11-2 and 11-3 illustrate the two levels of translation table structures supported by mpc860 special hardware. when md_ctr twam = 1, the tablewalk begins at the level one base address in the m_twb register. the level one table is indexed by the ten most-significant bits (bits 0?) of the effective address to get the level one page descriptor. for 8m pages, there must be two identical entries in the level one table for either bit 9 = 0 or bit 9 =1. see table 11-2 for more information. the level two base address from the level one descriptor is indexed by the next ten least-significant bits (bits 0?) to find the level two page descriptor. for pages larger than 4k, the entry in the level two table must be duplicated according to the page size. see table 11-3 for more information. during address translation by the memory management unit, the most-significant bits of the missed effective address are replaced by the real page address bits from the level two page descriptor. the number of replaced bits depends on the page size. the rest of the real address bits are taken directly from the effective address. when md_ctr twam = 0, the tablewalk begins at the level one base address placed in the m_twb register. the level one table is indexed by the 12 most-significant bits (bits 0?1) of the effective address to get the level one page descriptor. for 8m pages, there must be eight identical entries in the level one table for bits 9?1 of the effective address. the level two base address from the level one descriptor is indexed by the next ten least-significant bits (bits 12?1) to find the level two page descriptor. for pages larger than 1k, the entry in the level two table must be duplicated according to the page size.
memory management unit motorola mpc801 user? manual 11-5 11 figure 11-2. two level translation table when md_ctr(twam) = 1 level 2 index page offset level one table pointer 0 9 10 19 20 31 level one table base level 1 index 00 019 level one descriptor 0 level one descriptor 1 level one descriptor n level one descriptor 1023 20 10 effective address level one table real address 12 - for 4k 10 level 1 index 20 20 level two table base level 2 index 00 10 14 - for 16k 19 - for 512k 23 - for 8m level two descriptor 0 level two descriptor 1 level two descriptor n level two descriptor 1023 10 level two table 20 real page address page offset 20 - for 4k 18 - for 16k 13 - for 512k 9 - for 8m
memory management unit 11-6 mpc801 user? manual motorola 11 figure 11-3. two level translation table when md_ctr(twam) = 0 level 2 index page offset level one table pointer 011122122 31 level one table base level 1 index 00 017 level one descriptor 0 level one descriptor 1 level one descriptor n level one descriptor 4095 18 12 effective address level one table real address 12 - for 4k 10 level 1 index 18 20 level two table base level 2 index 00 12 14 - for 16k 19 - for 512k 23 - for 8m level two descriptor 0 level two descriptor 1 level two descriptor n level two descriptor 1023 10 level two table 20 real page address page offset 20 - for 4k 18 - for 16k 13 - for 512k 9 - for 8m 20 - for 1k 12 - for 1k
memory management unit motorola mpc801 user? manual 11-7 11 during the memory management unit? address translation, the most-significant bits of the missed effective address are replaced by the real page address bits from the level two page descriptor. the number of replaced bits depends on the page size. the rest of the real address bits are taken directly from the effective address. see table 11-1 for details. table 11-1. number of effective address bits replaced by real address bits page size number of replaced effective address bits 1k 20 4k 20 16 k 18 512k 13 8m 9 table 11-2. number of identical entries required in the level one table page size md_ctr twam = 0 md_ctr twam = 1 1k 1 4k 1 1 16k 1 1 512k 1 1 8m 8 2 table 11-3. number of identical entries required in the level two table page size md_ctr twam = 0 md_ctr twam = 1 1k 1 4k 4 1 16k 16 4 512k 512 128 8m 1,024 1,024
memory management unit 11-8 mpc801 user? manual motorola 11 11.5.1 level one descriptor the following table describes the hardware supported level one descriptor format that minimizes the software tablewalk routine. table 11-4. level one (segment) descriptor format bits mnemonic description function 0-17 l2ba level 2 table base address 18-19 these bits are used only when md_ctr twam = 1, otherwise they should be ? 20-22 reserved 23-26 apg access protection group 27 g guarded storage attribute for entry 0 -unguarded storage 1 - guarded storage 28-29 ps page size level one 00 - small (4k or 16k) 01 - 512k 11 - 8k 10 - reserved 30 wt writethrough attribute for entry 0 - copyback cache policy region (default) 1 - writethrough cache policy region 31 v segment valid bit 0 - segment is not valid 1 - segment is valid
memory management unit motorola mpc801 user? manual 11-9 11 11.5.2 level two descriptor the following table describes the hardware supported level two descriptor format that minimizes the software tablewalk routine. table 11-5. level two (page) descriptor format bits mnemonic description 4k pages with 1k resolution protection 4k resolution protection and pages larger than 4k 0-19 rpn real page number 20-21 pp protection for the first 1k subpage in a 4k page for instruction pages: privileged problem 00 ? no access no access 01 ? executable no access 10 ? executable executable 11 ? executable executable for data pages privileged problem 00 ? no access no access 01 ? read/write no access 10 ? read/write read-only 11 ? read/write read/write for instruction pages: privileged problem extended encoding: 00 ? no access no access 01 ? executable no access 10 ? reserved 11 ? reserved powerpc encoding: 00 ? executable executable 01 ? executable no access 10 ? executable executable 11 ? executable executable for data pages privileged problem extended encoding: 00 ? no access no access 01 ? read only no access 10 ? reserved 11 ? reserved powerpc encoding: 11 ?read only read only 00 ?read/write no access 01 ?read/write read only 10 ?read/write read/write 22-27 pp protection for a second 1k subpage in a 4k page for instruction pages: privileged problem 00 ? no access no access 01 ? executable no access 10 ? executable executable 11 ? executable executable 0 ?bits 20-21 contain powerpc encoding 1 ?bits 20-21 contain extended encoding c ?change bit for entry 0 ?unchanged region (write-protected) 1 ?changed region (write allowed)
memory management unit 11-10 mpc801 user? manual motorola 11 11.6 memory management unit programming model all memory management unit special registers can be accessed by the powerpc mtspr / mfspr instructions. in addition, the powerpc tlbie and tlbia architecture instructions are supported. memory management unit registers should be accessed when both msr ir =0 and msr dr =0. no similar restriction exists for the tlbie and tlbia instructions. 11.6.1 configuration registers 11.6.1.1 instruction mmu control register gpm?roup protection mode 0 = powerpc mode. 1 = domain manager mode. for data pages privileged problem 00 ? no access no access 01 ? read/write no access 10 ? read/write read-only 11 ? read/write read/write md_ctr(ppcs) = 0 md_ctr(pccs) = 1 0 ?subpage is not valid 1000 ?hit only for 1 ?subpage is valid privileged accesses 0100 ?hit only for if the page size is problem accesses larger than 4k. then 1100 ?hit for both all four bits should have the same value. 28 sps small page size should be 0 0 ?4k 1 ?16k 29 sh shared page 0 this entry marches only if the asid filed in the tlb entry matches the value of the m_casid register. 1 asid comparison is disabled for the entry. 30 ci cache inhibit cache-inhibit attribute for the entry. 31 v valid bit page valid bit mi_ctr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gpm ppm cidef res rsvi res ppcs reserved reset 0000000 0 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved itlb_indx reserved reset 00 0 r/w r/w r/w r/w table 11-5. level two (page) descriptor format (continued) bits mnemonic description 4k pages with 1k resolution protection 4k resolution protection and pages larger than 4k
memory management unit motorola mpc801 user? manual 11-11 11 ppm?age protection mode 0 = page resolution protection. 1 = 1k resolution protection for a 4k page. cidef?i default default value for instruction cache-inhibit attribute when the instruction memory management unit is disabled (msr ir = 0). bits 3 and 5?eserved these bits are reserved and should be set to 0. ignored on write and returns a 0 on read. rsvi?eserve two instruction tlb entries 0 = itlb_indx decremented modulo 8. 1 = itlb_indx decremented modulo 6. ppcs?rivilege/problem state compare mode 0 = ignore problem/privilege state during address compare. 1 = consider problem/privilege state according to mi_rpn[24:27]. bits 7?8 and 24?1?eserved these bits are reserved and should be set to 0. ignored on write and returns a 0 on read. itlb_indx?nstruction tlb index these bits act as pointers to the instruction tlb entry to be loaded. they are automatically decremented at every instruction tlb update. 11.6.1.2 mi_ap register. the reset value of the instruction mmu access protection (mi_ap) register is undefined. gp?roup protection in domain manager mode mi_ctr (gpm) = 1, these bits have the following settings: 00 = no access. 01 = client-access permission defined by page protection bits. 10 = reserved. 11 = manager-free access. mi_ap bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gp bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field gp
memory management unit 11-12 mpc801 user? manual motorola 11 in powerpc group protection mode mi_ctr(gpm) = 0, the gp bits have these settings and are ks and kp in powerpc microprocessor family: the programming environment: 00 = all accesses are considered privileged. 01 = access permission defined by page protection bits. 10 = problem and privileged interpretation is swapped. 11 = all accesses are considered problem. 11.6.1.3 data mmu control register gpm?roup protection mode 0 = powerpc mode. 1 = domain manager mode. ppm?age protection mode 0 = page resolution protection. 1 = 1k resolution protection for a 4k page. cidef?i default this bit is the data cache attributes?default value when the data memory management unit is disabled (msr dr = 0). wtdef?t default this bit is the data cache attributes?default value when the data memory management unit is disabled (msr dr = 0). rsvd?eserve two data tlb entries 0 = dtlb_indx decremented modulo 8. 1 = dtlb_indx decremented modulo 6. twam?ablewalk assist mode 0 = 1k subpage hardware assist. 1 = 4k page hardware assist. ppcs?rivilege/problem state compare mode 0 = ignore problem/privilege state during address compare. 1 = consider problem/privilege state according to md_rpn[24:27]. md_ctr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gpm ppm cidef wtdef rsv4d twam ppcs reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved dtlb_indx reserved
memory management unit motorola mpc801 user? manual 11-13 11 bits 7?8 and 24?1?eserved these bits are reserved and should be set to 0. ignored on write and returns a 0 on read. itlb_indx?nstruction tlb index these bits act as pointers to the data tlb entry to be loaded. they are automatically decremented at every data tlb update. 11.6.1.4 md_ap register. the reset value of the data mmu access protection (mc_ap) register is undefined. gp?roup protection in domain manager md_ctr (gpm) = 1 mode, these bits have the following settings: 00 = no access. 01 = client-access permission defined by page protection bits. 10 = reserved. 11 = manager-free access. in powerpc group protection mode mi_ctr (gpm) = 0, the gp bits have these settings and are ks and kp in powerpc microprocessor family: the programming environment: 00 = all accesses are considered privileged. 01 = access permission defined by page protection bits. 10 = problem and privileged interpretation is swapped. 11 = all accesses are considered problem. md_ap bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gp bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field gp
memory management unit 11-14 mpc801 user? manual motorola 11 11.6.1.5 casid register. the reset value of the current address space id (casid) register is undefined. this register is typically loaded by a task switch handler. bits 0?7?eserved these bits are reserved and should be set to 0. casid?urrent address space id this field is compared with the asid field of a tlb entry to qualify a match. 11.6.2 tablewalk registers 11.6.2.1 m_twb register. the reset value of the mmu tablewalk base (m_twb) register is undefined. l1indx?evel 1 table index these bits are ignored on write. they return md_epn[0:9] on read when md_ctr twam = 1 and md_epn[2:11] when md_ctr twam = 0. bits 30?1?eserved these bits are reserved and should be set to 0. ignored on write and returns a 0 on read. m_casid bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved casid m_twb bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field l1tb bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field l1tb l1indx reserved
memory management unit motorola mpc801 user? manual 11-15 11 11.6.2.2 m_tw register. the mmu tablewalk scratch (m_tw) register is used in the software tablewalk interrupt handlers to save one of the interrupted task general-purpose registers. the reset value of this register is undefined. 11.6.2.3 mi_epn register. the reset value of the instruction mmu effective page number (mi_epn) register is undefined. this register is used to define the effective page number and address space id to be loaded into the translation lookaside buffer. epn?ffective page number for the tlb entry this field is the effective address? default value of the last instruction tlb miss. bits 20?1 and 23?7?eserved these bits are reserved and should be set to 0. ev?lb entry valid bit this bit is automatically set to 1 on every instruction tlb miss. 0 = the tlb entry is invalid. 1 = the tlb entry is valid. asid?ddress space id these bits represent the address space id of the instruction tlb entry to be compared with the casid field of the m_casid register. m_tw bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field m_tw bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field m_tw mi_epn bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field epn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field epn reserved ev reserved asid
memory management unit 11-16 mpc801 user? manual motorola 11 11.6.2.4 mi_twc register. the reset value of the instruction mmu tablewalk control (mi_twc) register is undefined. bits 0?2 and 30?eserved these bits are reserved and should be set to 0. apg?ccess protection group up to 16 protection groups supported. default value on instruction tlb miss is 0. g?uarded storage attribute for entry default value on instruction tlb miss is 0. 0 = unguarded storage. 1 = guarded storage. ps?age size level one default value on instruction tlb miss is 00. 00 = small (4k or 16k). 01 = 512k. 11 = 8m. 10 = reserved. v?ntry valid default value on instruction tlb miss is 1. 0 = entry is not valid. 1 = entry is valid. mi_twc bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved apg g ps res v
memory management unit motorola mpc801 user? manual 11-17 11 11.6.2.5 mi_rpn register. the reset value of the instruction mmu real page number port (mi_rpn) register is undefined. writing to this register causes the values/attributes stored in mi_epn, mi_twc, and those written to this register, to be loaded into the tlb entry pointed by the mi_ctr register. pp0?p3?age protection 0? these bits represent the protection attributes for the first, second, third, and fourth subpages of a 4k page. for 4k pages with 1k resolution protection, the pp bits function as follows. for 4k resolution protection and pages larger than 4k, the pp bits function as follows. mi_rpn bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn pp0 pp1 pp2 pp3 lps sh ci v privileged problem 00 no access no access 01 executable no access 10 executable executable 11 executable executable privileged problem extended encoding 00 no access no access 01 executable no access 10 reserved reserved 11 reserved reserved powerpc encoding 11 executable executable 00 executable no access 01 executable executable 10 executable executable
memory management unit 11-18 mpc801 user? manual motorola 11 spv0?pv3?k subpage valid 0? for page sizes larger than 4k, all four bits should have the same value and be set as follows: if md_ctr(pccs) = 0: 0 = subpage is invalid. 1 = subpage is valid. if md_ctr(pccs) = 1: 1000 = hit only for privileged accesses. 0100 = hit only for problem accesses. 1100 = hit for privileged and problem accesses. lps?arge page size for 4k pages with 1k resolution protection, the pp bits should be 0. for 4k resolution protection and pages larger than 4k, the pp bits function as follows: 0 = 4k. 1 = 16k. sh?hared page 0 = this entry matches only if the asid filed in the tlb entry matches the value of the m_casid register. 1 = asid comparison is disabled for the entry. ci?ache inhibit cache-inhibit attribute for the entry. v?alid entry valid indication. 11.6.2.6 md_epn register. the reset value of the data mmu effective page number (md_epn) register is undefined. this register is copied to the appropriate tlb entry when a write is made to the md_rpn register. epn?ffective page number for entry the default value is the effective address of the last data tlb miss. md_epn bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field epn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field epn ev reserved asid
memory management unit motorola mpc801 user? manual 11-19 11 ev?lb entry valid this bit is set to 1 on a data tlb miss. this bit specifies a valid tlb bridge when loaded into a tlb entry. 0 = the data tlb entry is invalid. 1 = the data tlb entry is valid. bits 23?7?eserved these bits are reserved and should be set to 0. ignored on write and returns a 0 on read. asid?ddress space id these bits are the address space ids of the tlb entry to be compared with the casid field of the m_casid register. 11.6.2.7 data mmu tablewalk control register. l2indx?evel 2 table index when read, these bits return md_epn[10:19] when md_ctr twam = 1 and md_epn[12:21] when md_ctr twam = 0. apg/l2indx?ccess protection group on write and level 2 table index on read when written, the apg bits support a maximum of 16 protection groups. they are set to 0000 on the data tlb miss. g/l2indx?uarded on write and l2indx on read when written, the g bit of the entry has the following settings and is set to 0 on a data tlb miss: 0 = unguarded storage. 1 = guarded storage. ps/l2indx?age size on write and l2indx on read when written, the ps bits have the following settings and are set to 0 on a data tlb miss: 00 = small (4k or 16k). 01 = 512k. 11 = 8m. 10 = reserved. md_twc bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field l2tb bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field l2tb l2indx apg/l2indx g/ l2indx ps/l2indx wt/ l2indx v/ l2indx
memory management unit 11-20 mpc801 user? manual motorola 11 wt/l2indx?ritethrough on write and 0 on read when written, the wt bit has the following settings and is set to 1 on a data tlb miss: 0 = copyback data cache policy page entry. 1 = writethrough data cache policy page entry. when read, a zero is returned. v/l2indx?alid entry on write and 0 on read when written, the v bit has the following settings and is set to 1 on a data tlb miss: 0 = entry is invalid. 1 = entry is valid. when read, a zero is returned. 11.6.2.8 md_rpn register. writing to the data mmu real page number port (md_rpn) register causes the values/attributes stored in mi_epn, mi_twc, and those written to this register, to be loaded into the tlb entry pointed by the mi_ctr register. pp0?p3?age protection 0? these bits represent the protection attributes for the first, second, third, and fourth subpages of a 4k page. for 4k pages with 1k resolution protection, the pp bits function as follows. md_rpn bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn pp0 pp1 pp2 pp3 lps sh ci v privileged problem 00 no access no access 01 read/write no access 10 read/write read-only 11 read/write read/write
memory management unit motorola mpc801 user? manual 11-21 11 for 4k resolution protection and pages larger than 4k, the pp bits function as follows. for 4k resolution protection and pages larger than 4k, the change bit for data tlb entry has the following settings: 0 = unchanged region. a write access to this page invokes an implementation specific instruction memory management unit interrupt. the software should take the appropriate action before setting this bit to 1. 1 = changed region. a write access to this page is allowed. spv0?pv3?k subpage valid 0? for page sizes larger than 4k, all four bits should have the same value and be set as follows: if md_ctr(pccs) = 0: 0 = subpage is invalid. 1 = subpage is valid. if md_ctr(pccs) = 1: 1000 = hit only for privileged accesses. 0100 = hit only for problem accesses. 1100 = hit for privileged and problem accesses. lps?arge page size for 4k pages with 1k resolution protection, the pp bits should be 0. for 4k resolution protection and pages larger than 4k, the pp bits function as follows: 0 = 4k. 1 = 16k. privileged problem extended encoding 00 no access no access 01 read-only no access 10 reserved reserved 11 reserved reserved powerpc encoding 11 read-only read-only 00 read/write no access 01 read/write read-only 10 read/write read/write
memory management unit 11-22 mpc801 user? manual motorola 11 sh?hared page 0 = this entry matches only if the asid filed in the tlb entry matches the value of the m_casid register. 1 = asid comparison is disabled for the entry. ci?ache inhibit cache-inhibit attribute for the entry. v?alid entry valid indication 11.6.3 instruction debug registers the mi_dcam, mi_dram0, and mi_dram1 registers are interface registers that enable them to read data mmu cam and ram entries. an attempt to write to the mi_dcam register using the mtspr instruction will load the cam and ram values of the entry pointed to by dtlb_indx to mi_dcam, mi_dram0, and mi_dram1. the source register in the mtspr instruction can be any register, since its value is not used. the values of the mi_dcam, mi_dram0, and mi_dram1 registers can be read using the mtspr instruction. if you try to write to the mi_dram0 and mi_dram1 registers using the mtspr instruction it will be considered a nop. 11.6.3.1 mi_dcam register. the reset value of instruction mmu cam entry read (mi_dcam) register is undefined. ps?age size 000 = 4k. 001 = 16k. 011 = 512k. 111 = 8m. 010 = reserved. 100 = reserved. 101 = reserved. 110 = reserved. asid?ddress space id these bits represent the data tlb entry to be compared with the casid field in the m_casid register. mi_dcam bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field epn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field epn ps asid sh spv
memory management unit motorola mpc801 user? manual 11-23 11 sh?hared page 0 = this entry matches only if the asid field in the data tlb entry matches the value of the m_casid register. 1 = asid comparison is disabled for the entry. spv?ubpage validity bit 28: 0 = subpage 0 (address[20:21]=00) is not valid. 1 = subpage 0 (address[20:21]=00) is valid. bit 29: 0 = subpage 1 (address[20:21]=01) is not valid. 1 = subpage 1 (address[20:21]=01) is valid. bit 30: 0 = subpage 2 (address[20:21]=10) is not valid. 1 = subpage 2 (address[20:21]=10) is valid. bit 31: 0 = subpage 3 (address[20:21]=11) is not valid. 1 = subpage 3 (address[20:21]=11) is valid. 11.6.3.2 mi_dram0 register. the reset value of the instruction mmu ram entry read register 0 (mi_dram0) is undefined. ps_b?age size 000 = 4k. 001 = 16k. 011 = 512k. 111 = 8m. 010 = reserved. 100 = reserved. 101 = reserved. 110 = reserved. apg?ccess protection group a maximum of 16 protection groups are supported and are represented in one? compliment format. mi_dram0 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn ps_b ci apg sfp
memory management unit 11-24 mpc801 user? manual motorola 11 sfp?rivileged (supervisor) fetch permission bit 28: 0 = subpage 0 (address[20:21]=00) privileged fetch is not permitted. 1 = subpage 0 (address[20:21]=00) privileged fetch is permitted. bit 29: 0 = subpage 1 (address[20:21]=01) privileged fetch is not permitted. 1 = subpage 1 (address[20:21]=01) privileged fetch is permitted. bit 30: 0 = subpage 2 (address[20:21]=10) privileged fetch is not permitted. 1 = subpage 2 (address[20:21]=10) privileged fetch is permitted. bit 31: 0 = subpage 3 (address[20:21]=11) privileged fetch is not permitted. 1 = subpage 3 (address[20:21]=11) privileged fetch is permitted. 11.6.3.3 mi_dram1 register. the reset value of the instruction mmu ram entry read register 1 (mi_dram1) is undefined. bits 0?5?eserved these bits are reserved and should be set to one. ufp?roblem (user) fetch permission bit 26: 0 = subpage 0 (address[20:21]=00) problem fetch is not permitted. 1 = subpage 0 (address[20:21]=00) problem fetch is permitted. bit 27: 0 = subpage 1 (address[20:21]=01) problem fetch is not permitted. 1 = subpage 1 (address[20:21]=01) problem fetch is permitted. bit 28: 0 = subpage 2 (address[20:21]=10) problem fetch is not permitted. 1 = subpage 2 (address[20:21]=10) problem fetch is permitted. bit 29: 0 = subpage 3 (address[20:21]=11) problem fetch is not permitted. 1 = subpage 3 (address[20:21]=11) problem fetch is permitted. mi_dram1 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved ufp pv g
memory management unit motorola mpc801 user? manual 11-25 11 pv?age validity 0 = page is invalid. 1 = page is valid. g?uarded storage attribute for entry this bit defines whether a page is guarded or not. it should be set to 1 for storage that has side effects on read. otherwise, it should be set to zero. 0 = unguarded storage. 1 = guarded storage. 11.6.4 data debug registers the md_dcam, md_dram0, and md_dram1 registers are interface registers that enable to read data mmu cam and ram entries. an attempt to write to the md_dcam register using the mtspr instruction will load the cam and ram values of the entry pointed by dtlb_indx to md_dcam, md_dram0, and md_dram1. the source register in the mtspr instruction can be any register, since its value is not used. the values of the md_dcam, md_dram0, and md_dram1 registers can be read using the mtspr instruction. if you try to write to the md_dram0 and md_dram1 registers using the mtspr instruction it will be considered a nop. 11.6.4.1 md_dcam register. the reset value of the data mmu cam entry read register is undefined. spvf?ubpage validity flags for bit 20: 0 = subpage 0 (address[20:21] = 00) is not valid. 1 = subpage 0 (address[20:21] = 00) is valid. for bit 21: 0 = subpage 1 (address[20:21] = 01) is not valid. 1 = subpage 1 (address[20:21] = 01) is valid. for bit 22: 0 = subpage 2 (address[20:21] = 10) is not valid. 1 = subpage 2 (address[20:21] = 10) is valid. md_dcam bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field epn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field epn spvf ps sh asid
memory management unit 11-26 mpc801 user? manual motorola 11 for bit 23: 0 = subpage 3 (address[20:21] = 11) is not valid. 1 = subpage 3 (address[20:21] = 11) is valid. ps?age size 000 = 4k. 001 = 16k. 011 = 512k. 111 = 8m. 010 = reserved. 100 = reserved. 101 = reserved. 110 = reserved. sh?hared page 0 = this entry matches only if the asid field in the data tlb entry matches the value of the m_casid register 1 = asid comparison is disabled for the entry asid?ddress space id these bits are the address space ids of the tlb entry to be compared with the casid field of the m_casid register. 11.6.4.2 md_dram0 register. the reset value of the data mmu ram entry read register 0 (md_dram0) is undefined. ps?age size 000 = 4k. 001 = 16k. 011 = 512k. 111 = 8m. 010 = reserved. 100 = reserved. 101 = reserved. 110 = reserved. apgi?ccess protection group inverted these bits are represented in one? complement format. md_dram0 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn ps apgi g wt ci reserved
memory management unit motorola mpc801 user? manual 11-27 11 g?uarded storage attribute for the entry 0 = unguarded storage. 1 = guarded storage. wt?ritethrough attribute for the entry 0 = copyback data cache policy page entry. 1 = writethrough data cache policy page entry. bits 30?1?eserved these bits are reserved and should be set to 0. 11.6.4.3 md_dram1 register. the reset value of the data mmu ram entry read register 1 (md_dram1) is undefined. bits 0?6?eserved these bits are reserved and should be set to 0. c?hange bit for data entry tlb 0 = unchanged region. write access to this page results in the implementation specific immu interrupt invocation. software should take an appropriate action before setting this bit to 1. 1 = changed region. write access is allowed to this page. evf?ntry valid flag 0 = entry is invalid. 1 = entry is valid. sa?rivileged (supervisor) access for bit 19: 0 = subpage 0 (address[20:21]=00) privileged access is not permitted. 1 = subpage 0 (address[20:21]=00) privileged access is permitted. for bit 20: 0 = subpage 1 (address[20:21]=01) privileged access is not permitted. 1 = subpage 1 (address[20:21]=01) privileged access is permitted. md_dram1 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field res c evf sa sat urp0 uwp0 urp1 uwp1 urp2 uwp2 urp3 uwp3
memory management unit 11-28 mpc801 user? manual motorola 11 for bit 21: 0 = subpage 2 (address[20:21]=10) privileged access is not permitted. 1 = subpage 2 (address[20:21]=10) privileged access is permitted. for bit 22: 0 = subpage 3 (address[20:21]=11) privileged access is not permitted. 1 = subpage 3 (address[20:21]=11) privileged access is permitted. sat?rivileged (supervisor) access type 0 = privileged access type is read-only. 1 = privileged access type is read/write. urp0?roblem (user) read permission page 0 0 = subpage 0 (address[20:21]=00) problem read access is not permitted. 1 = subpage 0 (address[20:21]=00) problem read access is permitted. uwp0?roblem (user) read permission page zero 0 = subpage 0 (address[20:21]=00) problem write access is not permitted. 1 = subpage 0 (address[20:21]=00) problem write access is permitted. urp1?roblem (user) read permission page 1 0 = subpage 1 (address[20:21]=01) problem read access is not permitted. 1 = subpage 1 (address[20:21]=01) problem read access is permitted. urp2?roblem (user) read permission page two 0 = subpage 2 (address[20:21]=10) problem read access is not permitted. 1 = subpage 2 (address[20:21]=10) problem read access is permitted. uwp2?roblem (user) write permission page two 0 = subpage 2 (address[20:21]=10) problem write access is not permitted. 1 = subpage 2 (address[20:21]=10) problem write access is permitted. urp3?roblem (user) read permission page three 0 = subpage 3 (address[20:21]=11) problem read access is not permitted. 1 = subpage 3 (address[20:21]=11) problem read access is permitted. uwp3?roblem (user) write permission page three 0 = subpage 3 (address[20:21]=11) problem write access is not permitted. 1 = subpage 3 (address[20:21]=11) problem write access is permitted.
memory management unit motorola mpc801 user? manual 11-29 11 11.7 interrupts 11.7.1 implementation specific instruction tlb miss the implementation specific instruction tlb miss interrupt occurs when msr ir =1 and there is an attempt to fetch an instruction from a page whose effective page number cannot be translated by the instruction tlb. the software tablewalk code is responsible for loading the translation information of the missed page from the translation table that resides in the memory. refer to section 11.8.1.1 translation reload examples for more information. 11.7.2 implementation specific data tlb miss the implementation specific data tlb miss interrupt occurs when msr dr =1 and there is an attempt to access a page whose effective page number cannot be translated by the data tlb. the software tablewalk code is responsible for loading the translation information of the missed page from the translation table that resides in the memory. refer to section 11.8.1.1 translation reload examples for more information. 11.7.3 implementation specific instruction tlb error the implementation specific instruction tlb error interrupt occurs under the following conditions: the effective address cannot be translated. either the segment or page valid bit of this page is cleared in the translation table. the fetch access violates storage protection. the fetch access is to guarded storage and msr ir =1. the reason for invoking the instruction tlb error interrupt handler can be found in the save/restore register 1. for bit assignments, refer to section 7.3.7.3.12 implementation specific instruction tlb error interrupt . it is the software? responsibility to invoke the instruction storage interrupt handler. 11.7.4 implementation specific data tlb error the implementation specific data tlb error interrupt occurs under one of the following conditions: the effective address of a load , store , icbi , dcbz , dcbst , dcbf , or dcbi instruction cannot be translated. either the segment or page valid bit of this page is cleared in the translation table. the access violates storage protection. an attempt is made to write to a page with a negated change bit.
memory management unit 11-30 mpc801 user? manual motorola 11 the data storage interrupt status register explains how the data tlb error interrupt handler is invoked. for bit assignments, refer to section 7.3.7.3.14 implementation specific data tlb error interrupt . it is the software? responsibility to invoke the data storage interrupt handler. 11.8 manipulating the tlb 11.8.1 reloading the tlb the tlb reload (tablewalk) function is performed in the software, but the hardware assists in the following ways: automatically stores the missed effective data or instruction address and default attributes in the mi_epn or md_epn registers, respectively. this value is loaded into the selected entry on a write to mi_rpn or md_rpn for the instruction and data tlb. automatically updates the replacement location counter to point to the entry to be replaced. this value is placed in the index field of the mi_ctr and md_ctr registers. generates a level one pointer when a mfspr rx, m_twb is performed by the concatenation of the level one table base with the level one index. refer to figure 11-2 and figure 11-3 for details. generates a level two pointer when a mfspr rx, md_twc is performed by the concatenation of the level two table base with the level two index. performs a write to the tlb entry by loading the tablewalk level two entry value to the mi_rpn or md_rpn register. makes a special register available for the software tablewalk routine, in addition to the architecture? four operating system special registers?prg0- sprg3. this allows the miss code to save enough general-purpose registers so that it can execute without corrupting the state of the existing general-purpose registers.
memory management unit motorola mpc801 user? manual 11-31 11 11.8.1.1 translation reload examples the following are code examples for generating the real page number using a two-level tree page table structure. the first example is of the data tlb reload and the second is of the instruction tlb reload. notice that the following assumptions are made: 1. m_twb holds the base pointer to the first level table. 2. both instruction and data address translation is turned off (msr ir =0 and msr dr =0). dtlb_swtw mtspr m_tw, r1 # save r1 mfspr r1, m_twb # load r1 with level one pointer lwz r1, (r1) # load level one page entry mtspr md_twc,r1 # save level two base pointer and # level one attributes mfspr r1, md_twc # load r1 with level two pointer # while taking into account the # page size lwz r1, (r1) # load level two page entry mtspr md_rpn, r1 # write tlb entry mfspr r1, m_tw # restore r1 rfi itlb_swtw mtspr m_tw, r1 # save r1 mfspr r1, srr0 # load r1 with instruction miss # effective address (the same data # may be taken from the mi_epn # register) mtspr md_epn, r1 # save instruction miss effective # address in md_epn mfspr r1, m_twb # load r1 with level one pointer lwz r1, (r1) # load level one page entry mtspr mi_twc,r1 # save level one attributes mtspr md_twc,r1 # save level two base pointer mfspr r1, md_twc # load r1 with level two pointer # while taking into account the # page size lwz r1, (r1) # load level two page entry mtspr mi_rpn, r1 # write tlb entry mfspr r1, m_tw # restore r1 rfi
memory management unit 11-32 mpc801 user? manual motorola 11 11.8.2 controlling the tlb replacement counter the tlb replacement counter can be controlled to only select among the first 6 entries in each tlb by setting the rsvi bit in the mi_ctr register or the rsvd bit in the md_ctr register. these control bits also affect the tlbia instruction. replacement counters are cleared to zero after the tlbia instruction is executed and the counters decrement after an appropriate tlb reload. 11.8.3 invalidating the tlb the mpc801 implements the tlbie instruction to invalidate the tlb entries. this instruction invalidates tlb entries in the tlb that hits, including the reserved entries. the 22 most-significant bits of the effective address are used in comparison since no segment registers are implemented. although, for entries with page sizes greater than 4k, some of the lower bits of the effective page number are ignored. the asid value in the entry is ignored for the purpose of matching an invalid address, thus multiple entries may be invalidated if they have the same effective address and different asid values. the mpc801 supports the tlbia instruction to invalidate all entries in both tlbs. if the rsvd or rsvi bit is set for a tlb, the two reserved entries will not be invalidated when tlbia is executed. however, the software can explicitly invalidate one or more of these entries by setting the index field in md_ctr (dtlb_indx) or mi_ctr (itlb_indx), negating the ev bit in md_epn or mi_epn, and performing a write to the appropriate md_rpn or mi_rpn. the tlbs are not automatically invalidated on reset, although they are disabled. however, they must be invalidated under program control. 11.8.4 loading the reserved tlb entries to load a single reserved entry in the tlb, follow these steps: 1. disable the tlb by clearing msr ir or msr dr as needed. 2. clear the rsvi (rsvd ) bit in the mi_ctr (md_ctr) register. 3. invalidate the effective address of the reserved page by using the tlbia or tlbie instruction. 4. set the itlb_indx (dtlb_indx) fields of the mi_ctr (md_ctr) register to the appropriate value between 27 and 31. 5. load the mi_epn (md_epn) register with the effective page number, the asid of the reserved page, and 1 as the ev bit. 6. run software tablewalk code to load the appropriate entry into the tlb. 7. if needed, repeat the three previous steps to load other tlb entries. 8. set the rsvi (rsvd ) bit in the mi_ctr (md_ctr) register. 11.9 requirements for accessing the memory management unit control registers all instruction and data memory management unit control registers should be accessed when both instruction and data address translation is turned off (msr ir =0 and msr dr =0). prior to an mtspr md_dcam rx instruction, an eieio instruction should be placed.
motorola mpc801 user? manual 12-1 12 section 12 system interface unit this section summarizes the mpc801 system interface unit (siu) functions that control system startup, initialization, operation, protection, and the external bus. the system configuration and protection function controls the overall system and provides various monitors and timers, including the bus monitor, software watchdog timer, periodic interrupt timer, powerpc decrementer, timebase, and real-time clock. the clock synthesizer generates the clock signals and other modules and external devices that the system interface unit uses. this circuitry generates the system clock from an inexpensive 32khz/4mhz crystal. the system interface unit supports various low-power modes and each one supplies a different range of power consumption, functionality, and wake-up time. the clock scheme supports low-power modes for applications that use the baud rate generators and/or serial ports during standby mode. the main system clock can be changed dynamically while the baud rate generators and serial ports work with a fixed frequency. for more information, refer to section 5 clocks and power control . the external bus interface (ebi) handles the transfer of information between the internal buses and the memory or peripherals in the external address space. the mpc801 is designed to allow external bus masters to request and obtain mastership of the system bus. section 13 external bus interface describes the bus operation, but the configuration control of the external bus interface is explained in this section. the memory controller module provides a glueless interface to many types of memory devices and peripherals. it supports a maximum of eight memory banks, each with its own device and timing attributes. memory control services are provided to both internal and external masters. note the chip? address bus is 26 bits wide, but the internal address bus is 32 bits wide. therefore, external accesses are internally considered 26 bit accesses (a[6?1]) with a[0?] equal to 0, while internal accesses are full 32-bit accesses. the mpc801 implementation supports circuit board test strategies through a user-accessible test logic that is fully compliant with section 19 ieee 1149.1 test access port .
system interface unit 12-2 mpc801 user? manual motorola 12 12.1 features the following is a list of the system interface unit? main features: system configuration and protection system reset monitoring and generation clock synthesizer power management external bus interface control eight memory banks supported by the memory controller debug support ieee 1149.1 test access port 12.2 system configuration and protection the mpc801 incorporates many system functions that normally must be provided in external circuits. it is designed to provide maximum system safeguards against hardware and/or software faults. the following features are provided in the system configuration and protection submodule: system configuration ?llows you to configure the system according to particular requirements. the functions include control of parity checking, show cycle operation, and part and mask number constants. bus monitor ?onitors the ta response time for all bus accesses initiated by the internal masters. a tea signal is asserted if the ta response limit is exceeded. this function can be disabled when necessary. software watchdog timer ?sserts a reset or nonmaskable interrupt selected by the system protection control register (sypcr) if the software fails to service the software watchdog timer (swt) after a certain period of time. after a system reset this function is enabled, selects a maximum timeout period, and asserts a system reset if the timeout is reached. the software watchdog timer can be disabled or its timeout period may be changed in the sypcr. once the sypcr is written, it cannot be written again until a system reset. periodic interrupt timer ?enerates periodic interrupts to be used with a real-time operating system or application software. the periodic interrupt timer (pit) is clocked by the pitrtclk clock, thus providing a period from 122 microseconds to 8,000 milliseconds assuming a 32.768-khz crystal. this function can be disabled if necessary. powerpc timebase counter ?his 64-bit counter that is defined by the powerpc architecture provides a timebase reference for the operating system or application software. the timebase counter (tb) has four independent reference registers that generate a maskable interrupt when the timebase counter reaches the value programmed in one of the four reference registers. the associated bit in the timebase status register is set for the reference register that generated the interrupt. the timebase is clocked by the tmbclk clock.
system interface unit motorola mpc801 user? manual 12-3 12 powerpc decrementer ?his 32-bit decrementing counter that is defined by the powerpc architecture provides a decrementer interrupt. this binary counter is clocked by the same frequency as the timebase. the decrementer (dec) is clocked by the tmbclk clock and the period in which it is driven by a 4mhz oscillator is 4,295 second, which is approximately 71.6 minutes. real-time clock ?rovides time-of-day information to the operating system or application software. it is composed of a 45-bit counter and an alarm register. a maskable interrupt is generated when the counter reaches the value programmed in the alarm register. the real-time clock (rtc) is clocked by the pitrtclk clock. freeze support ?he system interface unit allows you to control whether the software watchdog timer, periodic interrupt timer, timebase, decrementer, and real-time clock should continue to run during freeze mode. figure 12-1 is a block diagram of the system configuration and protection logic. figure 12-1. system configuration and protection logic module configuration bus monitor periodic interrupt timer software watchdog timer powerpc decrementer powerpc timebase counter real-time clock clock tea interrupt interrupt or system reset interrupt interrupt interrupt
system interface unit 12-4 mpc801 user? manual motorola 12 12.3 configuring the system many aspects of the system configuration are controlled by the siu module configuration register (siumcr). see section 12.12 programming the system interface unit for more information. the siumcr is the only register from the mpc860 that has been altered to fit the requirements of the mpc801. 12.3.1 configuring the interrupt an overview of the mpc801 interrupt structure is illustrated in figure 12-2. the system interface unit receives interrupts from internal sources, like the periodic interrupt timer or real-time clock, and from external pins irq [0:7]. figure 12-2. mpc801 interrupt structure level 2 level 7 level 6 level 5 level 4 level 3 level 1 level 0 nmi irq [0:7] ireq nmi gen powerpc core system timebase preiodic real-time software irq0 interrupt controller decrementer decrementer debug debug selector edge det watchdog timer interface unit interrupt timer clock
system interface unit motorola mpc801 user? manual 12-5 12 if it is programmed to generate an interrupt, the software watchdog timer always generates a nonmaskable interrupt (nmi) to the core. the external irq0 pin can generate an nmi as well. the core takes the system reset interrupt when an nmi is asserted and the external interrupt when any other interrupt is asserted by the interrupt controller. each one of the external irq pins has its own dedicated assigned priority level and there are eight additional interrupt priority levels. each one of the system interface unit internal interrupt sources, the interrupt request which is generated by the cpm interrupt controller, can be assigned by the software to any one of those eight interrupt priority levels. thus, you get a very flexible interrupt scheme. 12.3.2 priority of the interrupt sources the system interface unit has 15 interrupt sources that assert just one interrupt request to the powerpc core. there are seven external irq pins (the eighth one generates an nmi) and eight interrupt levels. the priority between all interrupt sources is shown in table 12-1. table 12-1. priority of system interface unit interrupt sources number priority level interrupt source description interrupt code 0 highest irq0 00000000 1 level 0 00000100 2 irq1 00001000 3 level 1 00001100 4 irq2 00010000 5 level 2 00010100 6 irq3 00011000 7 level 3 00011100 8 irq4 00100000 9 level 4 00100100 10 irq5 00101000 11 level 5 00101100 12 irq6 00110000 13 level 6 00110100 14 irq7 00111000 15 lowest level 7 00111100 16-31 reserved
system interface unit 12-6 mpc801 user? manual motorola 12 12.3.2.1 programming the interrupt controller. the system interface unit interrupt controller contains the sipend, simask, siel, and sivec registers. 12.3.2.1.1 siu interrupt pend register. the 32-bit siu interrupt pend (sipend) register contains bits that individually correspond to an interrupt request. the bits associated with internal exceptions indicate, if set, that an interrupt service is requested. these bits reflect the status of the internal requestor device and are cleared when the appropriate actions are software-initiated in the device. writing to these bits has no effect. the bits associated with the irq pins have a different behavior, depending on the sensitivity defined for them in the siel register. when the irq pin is defined as a ?evel?interrupt the corresponding bit behaves similar to the bits associated with internal interrupt sources. when the irq pin is defined as an ?dge?interrupt and if the corresponding bit is set, it indicates that a falling edge was detected on the signal. this bit is reset by writing a 1 to it. irq?nterrupt request 0? these bits reflect the status of the enternal interrupt requests. 0 = the appropriate interrupt service is not requested. 1 = the appropriate interrupt service is requested. lvl?evel 0? these bits reflect the status of the internal requestor device. 0 = the appropriate interrupt service is not requested. 1 = the appropriate interrupt service is requested. bits 16?1?eserved these bits are reserved and should be set to 0. sipend bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field irq0 lvl0 irq1 lvl1 irq2 lvl2 irq3 lvl3 irq4 lvl4 irq5 lvl5 irq6 lvl6 irq7 lv7 reset 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved reset 0 r/w r/w
system interface unit motorola mpc801 user? manual 12-7 12 12.3.2.2 siu interrupt mask register. the 32-bit read/write siu interrupt mask (simask) register contains bits that individually correspond to the interrupt request bits in the sipend register. when a bit is set, it enables the generation of an interrupt request to the core. simask is updated by the software and cleared at reset. it is the responsibility of the software to determine which of the interrupt sources are enabled at a given time. irm?nterrupt mask these bits are used as mask bits to both internal and external interrupt requests. 0 = the appropriate interrupt service is not requested. 1 = the appropriate interrupt service is requested. lvm?evel mask these bits... 0 = the appropriate interrupt service is not requested. 1 = the appropriate interrupt service is requested. bits 16?1?eserved these bits are reserved and should be set to 0. simask bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field irm0 lvm0 irm1 lvm1 irm2 lvm2 irm3 lvm3 irm4 lvm4 irm5 lvm5 irm6 lvm6 irm7 lvm7 reset 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved reset 0 r/w r/w
system interface unit 12-8 mpc801 user? manual motorola 12 12.3.2.3 siu interrupt edge level mask register. the 32-bit read/write siu interrupt edge level mask (siel) register contains pairs of bits that individually correspond to an external interrupt request. the ed x bit, if set, specifies that a falling edge in the corresponding irq signal is detected as an interrupt request. when the ed x bit is zero, a low logical level in the irq signal is detected as an interrupt request. the wm x bit, if set, indicates that a low-level detection in the corresponding interrupt request line causes the mpc801 to exit low-power mode. a couple of ed bits with the appropriate wm bits specifies the external interrupt request generation. ed this bit specifies: 0 = level. 1 = falling edge. wm this bit is specified when a high or low level interrupt generation causes an interrupt. bits 16?1?eserved these bits are reserved and should be set to 0. siel bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ed0 wm0 ed1 wm1 ed2 wm2 ed3 wm3 ed4 wm4 ed5 wm5 ed6 wm6 ed7 wm7 reset 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved reset 0 r/w r/w
system interface unit motorola mpc801 user? manual 12-9 12 12.3.2.4 siu interrupt vector register. the 32-bit read-only siu interrupt vector (sivec) register contains an 8-bit code representing an unmasked interrupt source of the highest priority level. the sivec register can be read as either a byte, half, or word. when read as a byte, a branch table can be used in which each entry contains one instruction. when read as a half-word, each entry can contain a full routine with a maximum of 256 instructions. the interrupt code is extended with two zero least-significant bits to allow the table to be indexed. refer to figure 12-3 for details. intc?nterrupt code these bits represent the index bits of the current highest unmasked interrupt request routine. bits 8?1?eserved these bits are reserved and should be set to 0. figure 12-3. interrupt table handling example sivec bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field interrupt code reserved r/w rr bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved r/w r base b routine1 b routine2 b routine3 b routine4 base + n base + 4 base + 8 base + c base +10 base 1st instruction of routine1 1st instruction of routine2 1st instruction of routine3 1st instruction of routine4 base + n base + 400 base + 800 base + c00 base +1000 intr: ?? save state r3 <- @ sivec r4 <-- base of branch table ?? lbz add mtspr bctr rx, r3 (0) # load as byte rx, rx, r4 ctr, rx intr: ?? save state r3 <- @ sivec r4 <-- base of branch table ?? lhz add mtspr bctr rx, r3 (0) # load as byte rx, rx, r4 ctr, rx
system interface unit 12-10 mpc801 user? manual motorola 12 12.4 the bus monitor the bus monitor ensures that each bus cycle is terminated within a reasonable period of time. the mpc801 system interface unit provides a bus monitor option that monitors internal and external bus accesses on the external bus. the monitor counts from transfer start to transfer acknowledge and from transfer acknowledge to transfer acknowledge within bursts. if the monitor times out, a tea signal is internally asserted. the programmability of the timeout allows for a variation in system peripheral response time. the timing mechanism is clocked by the system clock divided by eight. the maximum value can be 2,040 system clocks. the bus monitor will always be active when freeze is asserted or when a debug mode request is pending, regardless of the state of the bmt enable bit. 12.5 the powerpc decrementer the 32-bit powerpc decrementing counter (dec) provides a decrementer interrupt. this binary counter is clocked by the same frequency as the timebase. in the mpc801, the decrementer is clocked by the tmbclk clock. the state of the decrementer is not affected by hreset and sreset and, therefore, should be initialized by the software. the decrementer runs continuously after power-up. it continues counting while hreset and sreset are asserted and it is implemented with the following requirements in mind. the decrementer interrupt is also sent to the power-down wake-up logic, thus allowing a pin to be toggled while the rest of the mpc801 is not running. the operation of the timebase and decrementer are coherent, which means the counters are driven by the same fundamental timebase. the decrementer remains unaffected when it is loading or unloading. when storing to the decrementer, the value in the decrementer is replaced with the value in the general-purpose register. when bit 0 (the most-significant bit) of the decrementer changes from 0 to 1, an interrupt request is signaled. if multiple decrementer interrupt requests are received before the first one is reported, only one interrupt is reported. if the decrementer is altered by the software and the content of bit 0 is changed from 0 to 1, an interrupt request is signaled. a decrementer exception causes a pending decrementer interrupt request in the core. when the decrementer interrupt is taken, the request is automatically cleared. the following chart shows some of the periods available for the decrementer, assuming a 4mhz crystal. t dec 32 2 f tmbclk () ------------------------------ =
system interface unit motorola mpc801 user? manual 12-11 12 12.6 the powerpc timebase the timebase (tb) is a powerpc architecture defined timer facility. it is a 64-bit free-running binary counter that is incremented at a frequency determined by each implementation of the timebase. there is no interrupt or other indication generated when the count rolls over. the timebase period depends on the driving frequency. for the mpc801, the timebase is clocked by the tmbclk clock and the timebase period is: the state of the timebase is unaffected by any resets and should be initialized by the software. reads and writes of the timebase are restricted to special instructions. for the mpc801 implementation, it is not possible to read or write the entire timebase in a single instruction. therefore, the mttb and mftb instructions are used to move the lower half of the timebase (tbl) while the mttbu and mftbu instructions are used to move the upper half of the timebase (tbu). the timebase has four reference registers associated with it. a maskable interrupt is generated when the timebase count reaches the value programmed in one of the four reference registers and the two status bits indicate which of the four reference registers generated the interrupt. 12.7 the real-time clock the real-time clock (rtc) is a 45-bit counter that is clocked by the pitrtclk clock. it is used to provide time-of-day indication to the operating system and application software. the counter is not affected by reset and operates in all low-power modes. it is initialized by the software. the real-time clock can be programmed to generate a maskable interrupt when the time value matches the value programmed in the associated alarm register. it can also be programmed to generate an interrupt once every second. a control and status register is used to enable or disable the different functions and report the interrupt source. the real-time clock related registers are ?ocked?after power-on reset. to enable a write action to any of these registers, a previously open operation should be taken. for more information refer to section 5.10.2 the key mechanism . count value timeout count value timeout 0 1 microsecond 999999 1.0 second 9 10. microseconds 9999999 10.0 seconds 99 100. microseconds 99999999 100.0 seconds 999 1.0 millisecond 999999999 1000. seconds 9999 10.0 milliseconds (hex) ffffffff 4295 seconds t tb 2 64 f tmbclk ------------------------ =
system interface unit 12-12 mpc801 user? manual motorola 12 figure 12-4. rtc block diagram 12.8 the periodic interrupt timer the periodic interrupt timer (pit) consists of a 16-bit counter clocked by a pitrtclk clock supplied by the clock module. it decrements to zero when loaded with a value from the periodic interrupt timer count (pitc) register and after the timer reaches zero, the ps bit is set and an interrupt is generated if the pie bit is a logic 1. at the next input clock edge, the value in the pitc register is loaded into the counter and the process starts all over again. when a new value is loaded into the pitc register, the periodic interrupt timer is updated, the divider is reset, and the counter starts counting. if the ps bit is not cleared, it generates an interrupt at the interrupt controller and the interrupt remains pending until it is cleared. if the ps bit is set again, prior to being cleared, the interrupt remains pending until the ps bit is cleared. any write to the pitc register stops the current countdown and the count resumes with a new value in the pitc. if the pte bit is not set, the periodic interrupt timer is unable to count and retains the old count value. reads of the periodic interrupt timer have no effect on it. figure 12-5. periodic interrupt timer block diagram pitrtclk freeze divide 32-bit counter 32-bit register sec alarm = clock disable divide mux 38k interrupt interrupt by 9,600 by 8,192 clock rtsec clock freeze 16-bit periodic interrupt pitrtclk ps pie pit pte disable clock modulus counter interrupt timer count register
system interface unit motorola mpc801 user? manual 12-13 12 the timeout period is calculated as: solving this equation using a 32.768khz external clock gives: this provides a range from 122 microseconds with a pitc register of $0000, to 8 seconds with a pitc of $ffff. 12.9 the software watchdog timer the software watchdog timer option prevents system lockout if the software becomes trapped in loops without a controlled exit. the software watchdog timer is enabled after system reset to cause a system reset if it times out. if you do not need the software watchdog timer, the swe bit in the system protection control register (sypcr) must be cleared to disable it. if you do need it, the software watchdog timer requires a special service sequence to be executed on a periodic basis. if this periodic servicing does not occur, the software watchdog timer times out and issues a reset or a nonmaskable interrupt, which is programmed by the swri bit in the sypcr register. once the software writes the sypcr register, the state of the swe bit cannot be changed. refer to the system configuration and protection registers for more information. to service the software watchdog timer, write $556c and then $aa39 to the software service register (swsr). this clears the watchdog timer and the timing process begins again. if any value other than $556c or $aa39 is written to the swsr, the entire sequence must be repeated. although the writes must occur in the correct order before a timeout occurs, any number of instructions can be executed between the writes. this allows interrupts and exceptions to occur between the two writes when necessary. refer to figure 12-6 for more information. pit period pitc 1 + f pitrtclk ------------------------- pitc 1 + externalclock 1 or 128 ------------------------------------------ ? ?? 4 ? ----------------------------------------------------------- - = = pitperiod pitc 1 + 8192 ------------------------- =
system interface unit 12-14 mpc801 user? manual motorola 12 figure 12-6. software watchdog timer service state diagram although most software disciplines permit or encourage the watchdog concept, some systems require a selection of timeout periods. for this reason, the software watchdog timer must provide a selectable range for the timeout period. figure 12-7 illustrates the present method for handling this need. in figure 12-7 also shows the range that the value swtc field determines. the value held in the swtc field is then loaded into a 16-bit decrementer clocked by the system clock. when necessary, an additional divide by 2,048 prescaler is used. the decrementer begins counting when loaded it is with a value from the swtc field. after the timer reaches $0, a software watchdog expiration request is issued to the reset or nmi control logic. at reset, the value in the swtc ?ld is set to the maximum value and is again loaded into the software watchdog register, thus starting the process all over again. when a new value is loaded into the swtc register, the software watchdog timer will not be updated until the servicing sequence is written to the swsr. if the swe bit is loaded with the 0 value, the modulus counter will not count. $556c / don?_reload reset $aa39 / reload state 0 waiting for $556c state 1 waiting for $aa39 not $aa39 / don?_reload not $556c / don?_reload
system interface unit motorola mpc801 user? manual 12-15 12 figure 12-7. software watchdog timer block diagram 12.10 freeze operation when the freeze signal is asserted, the clocks to the software watchdog, periodic interrupt timer, real-time clock, timebase counter, and decrementer can be disabled. this is controlled by the associated bits in the control register of each timer. if they are programmed to stop during freeze, the counters maintain their values while freeze is asserted, unless that is changed by the software. the bus monitor is enabled, regardless of this signal. 12.10.1 low-power stop operation when the powerpc core is set to low-power mode, the software watchdog timer is frozen. it remains frozen and maintains its count value until the core exits this mode and continues to execute instructions. the periodic interrupt timer, decrementer, or timebase are not influenced by these low-power modes and they continue to run at their respective frequencies. these timers can generate an interrupt to bring the mpc801 out of the low-power modes. disable clock freeze swr / decrementer timeout 16-bit swtc swe service logic reload rollover = 0 reset swsr mux 2,048 core swp clock divide by or nmi
system interface unit 12-16 mpc801 user? manual motorola 12 12.11 multiplexing the system interface unit pins due to the limited number of pins available in the mpc801 package, some of the functionalities defined in the various sections share pins. the actual mpc801 pinout is illustrated in section 2 external signals . the following table shows how the functionality is controlled on each pin. table 12-2. multiplexing control pin name pin configuration control bdip /gplb5 rsv /irq2 cr /irq3 kr /irq4 frz/irq6 programmed in the siumcr. we0 /bs_ab0 we1 /bs_ab 1 we2 /bs_ab 2 we3 /bs_ab 3 dynamically active depending on the machine (gpcm or upmb) assigned to control the required slave. gpla0 /gplb0 dynamically active depending on the machine (upma or upmb) assigned to control the required slave. oe /gpla1 /gplb1 dynamically active depending on the machine (gpcm, upma, or upmb) assigned to control the required slave. gpla [2:3]/gplb [2:3]/cs [2:3] gpla [2:3]/gplb [2:3]: dynamically active depending on the machine (upma or upmb) assigned to control the required slave. gplx [2:3]/cs [2:3]: programmed in the siumcr. iwp[0:1]/vfls[0:1] iwp2/vf2 lwp0/vf0 lwp1/vf1 dsck/at1 ptr /at3 tdi/dsdi irq5 /dsdi tck/dsck tdo/dsdo programmed in the siumcr and hard reset configuration. modck1/sts modck2/dsdo at power-on reset, modck[1:2]. otherwise, it is programmed in the siumcr and hard reset configuration.
system interface unit motorola mpc801 user? manual 12-17 12 12.12 programming the system interface unit 12.12.1 system configuration and protection registers 12.12.1.1 siu module configuration register. the siu module configuration register (siumcr) contains bits that configure various features of the system interface unit module. earb?xternal arbitration if this bit is set (1), external arbitration is assumed. if it is cleared (0), internal arbitration is performed. for more information, refer to section 13.4.6 arbitration phase signals . earp?xternal arbitration request priority this field defines the priority of the external master? arbitration request. this field is valid when earb is cleared. 000 is the lowest priority level and 111 is the highest. for more information, refer to section 13.4.6 arbitration phase signals . bits 4? and 13?eserved these bits are reserved and should be set to 0. dshw?ata show cycles this bit selects the show cycle mode to be applied to data cycles. instruction show cycles are programmed in the ictrl register. refer to section 18.5.2 development port registers for more information. this bit is locked by the dlk bit. 0 = disable show cycles for all internal data cycles. 1 = show address and data of all internal data cycles. siumcr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field earb earp reserved dshw dbgc dbpc res frc dlk reset 00 0 000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field opar pncs dpc mp re mlrc aeme seme res gb5e b2dd b3dd reserved reset 0000 0 000000 0 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
system interface unit 12-18 mpc801 user? manual motorola 12 dbgc?ebug pin configuration this field configures the debug pins?functionality. 0x = iwp[0:1]/vfls[0:1] functions as iwp[0:1] iwp2/vf2 functions as iwp2 lwp0/vf0 functions as lwp0 lwp1/vf1 functions as lwp1 modck1/sts functions as sts dsck/at1 functions as at1 dsdi/irq5 functions as irq5 ptr /at3 functions as at3 modck2/dsdo functions as dsdo 10 = reserved 11 = iwp[0:1]/vfls[0:1] functions as vfls[0:1] iwp2/vf2 functions as vf2 lwp0/vf0 functions as vf0 lwp1/vf1 functions as vf1 modck1/sts functions as sts dsck/at1 functions as at1 dsdi/irq5 functions as irq5 ptr /at3 functions as at3 modck2/dsdo functions as dsdo dbpc?ebug port pins configuration this field configures the pins on which the development port is active. 00 = dsck/at1 functions as defined by dbgc dsdi/irq5 functions as defined by dbgc ptr /at3 functions as defined by dbgc tck/dsck functions as dsck tdi/dsdi functions as dsdi tdo/dsdo functions as dsdo 01 = dsck/at3 functions as defined by dbgc dsdi/irq5 functions as defined by dbgc ptr /at3 functions as defined by dbgc tck/dsck functions as tck tdi/dsdi functions as tdi tdo/dsdo functions as tdo 10 = reserved 11 = dsck/at1 functions as dsck dsdi/irq5 functions as dsdi ptr /at3 functions as ptr tck/dsck functions as tck tdi/dsdi functions as tdi tdo/dsdo functions as tdo
system interface unit motorola mpc801 user? manual 12-19 12 frc?rz pin configuration this bit configures the functionality of the frz/irq6 pin. 0 = frz/irq6 functions as frz. 1 = frz/irq6 functions as irq6 . dlk?ebug register lock if this bit is set (1), bits 8?5 are locked and writes to those bits can no longer be performed. bits 8?5 can be written in test mode once the internal freeze is asserted, regardless of the state of dlk. this bit is cleared by reset. opar?dd parity this bit is used to program odd or even parity. it can also be used to generate parity errors for testing purposes by writing the memory with opar = 1 and reading the memory with opar = 0. pncs?arity enable for nonmemory controller regions this bit enables parity generation/checking for memory regions not controlled by the memory controller. dpc?ata parity pins configuration this bit configures the functionality of the dp[0:3]/irq [3:6] pins. 0 = dp[0:3]/irq [3:6] functions as irq [3:6]. 1 = dp[0:3]/irq [3:6] functions as dp[0:3]. mpre?ultiprocessors reservation enable this bit configures the functionality of the rsv /irq2 and cr /irq3 pins. 0 = rsv /irq 2 and cr /irq 3 function as rsv and cr accordingly. reservation protocol is enabled. 1 = rsv /irq 2 and cr /irq 3 function as irq2 and irq3 accordingly. reservation protocol is disabled. mlrc?ulti-level reservation control this bit configures the functionality of the kr /irq4 pins. 00 = kr /irq4 functions as irq4 . 01 = reserved. 10 = kr /retry /irq4 functions as kr /retry . 11 = reserved. aeme?synchronous external master enable this bit configures how the memory controller refers to external asynchronous masters initiating a transaction. if this bit is set, the memory controller interprets any assertion on the as pin as an external asynchronous master initiating a transaction. if it is reset, the memory controller ignores the value of the as pin.
system interface unit 12-20 mpc801 user? manual motorola 12 seme?ynchronous external master enable this bit configures how the memory controller refers to external synchronous masters initiating a transaction. if this bit is set, the memory controller interprets any ts assertion that the external bus does not own as an external synchronous master initiating a transaction. if it is reset, the memory controller ignores the value of the ts pin when it does not own the external bus. bits 24 and 28?1?eserved these bits are reserved and should be set to 0. gb5e?plb(5) enable if this bit is set (1), then the gplb 5 of the memory controller functionality is active. if it is cleared (0), the bdip signal functionality is active. b2dd?ank 2 double drive if this bit is set (1), then the cs2 signal is reflected onto gpla2 /gplb2 . b3dd?ank 3 double drive if this bit is set (1), then the cs3 signal is reflected onto gpla3 /gplb3 . 12.12.1.2 internal memory map register. the internal memory map register (immr) is located within the powerpc special register space. it contains the identification of a specific device as well as a base for the internal memory map. based on the value read from this register, the software can deduce the availability and location of any on-chip system resource. the contents of this register can be read by the mfspr instruction and the isb field can be written by the mtspr instruction. however, the partnum and masknum fields are mask programmed and cannot be changed for any device. isb?nternal space base this read/write field defines the base address of the internal memory space. the initial value of this field can be configured at reset to one of four addresses and changed to any value by the software. the number of programmable bits in this field and the resolution of the location of internal space depends on the internal memory space of the specific implementation. immr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field isb reset 0 r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field partnum masknum reset 10 00 r/w rr
system interface unit motorola mpc801 user? manual 12-21 12 in the mpc801, all 16 bits can be programmed. refer to section 3 memory map for details on the device? internal memory map and section 4.3.1.1 hard reset configuration word for the available and default initial values. partnum?art number this read-only field is mask programmed with a code corresponding to the part number of the part on which the system interface unit is located. it is intended to help factory test and user code that is sensitive to part refinements. this field changes as the part number changes. for example, it would change if a new module is added or if the size of the memory module is revised. however, it would not change if the part is revised to fix a bug in an existing module. the mpc801 has an id of $10. masknum?ask number this read-only field is mask programmed with a code corresponding to the mask number of the part on which the system interface unit is located. it is intended to help factory test and user code that is sensitive to part refinements. it is programmed in a frequently changed layer and should be revised for all mask set modifications. the mpc801 rev 0 has an id of $00. 12.12.1.3 system protection control register. the system protection control register (sypcr) controls the system monitors, software watchdog period, and bus monitor timing. this register can be read at any time, but can only be written once after system reset. swtc?oftware watchdog timer count this field contains the count value for the software watchdog timer. bmt?us monitor timing this field defines the timeout period, in 8 system clock resolution, for the bus monitor. bme?us monitor enable this bit controls the operation of the bus monitor when an internal to external bus cycle is executed. 0 = disable the bus monitor. 1 = enable the bus monitor. sypcr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field swtc reset 1 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field bmt bme reserved swf swe swri swp reset 1 0 0 0111
system interface unit 12-22 mpc801 user? manual motorola 12 bits 25?7?eserved these bits are reserved and should be set to 0. swf?oftware watchdog freeze if this bit is asserted (1), the software watchdog timer stops when freeze indicator is asserted (debug mode). otherwise, it is free running. swe?oftware watchdog enable this bit enables the software watchdog timer. to disable the software watchdog timer, it should be cleared by the software after a system reset. swri?oftware watchdog reset/interrupt select when this bit is cleared, the software watchdog timer causes a nonmaskable interrupt to the core. when it is set, the software watchdog timer causes a system reset. swp?oftware watchdog prescale this bit controls the divide-by-2,048 software watchdog timer prescaler. if it is cleared, the software watchdog timer is not prescaled and if it is set, the software watchdog timer clock is prescaled. 12.12.1.4 software service register. the software service register (swsr) is the location the software watchdog timer servicing sequence writes to. to prevent a software watchdog timer timeout, a write of $556c followed by $aa93 should be written to this register. the swsr can be written at any time, but returns all zeros when read. 12.12.1.5 transfer error status register. the transfer error status register (tesr) contains a bit for each exception source generated by a transfer error. a bit set to logic 1 indicates what type of transfer error exception occurred since the last time the bits were cleared by reset or by the normal software status bit clearing mechanism. canceled speculative accesses that do not cause an interrupt allow these bits to be set. the register has two identical sets of bit fields?ne is associated with instruction transfers and the other with data transfers. bits 0?7 and 24?5?eserved these bits are reserved and should be set to 0. tesr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved reset 0 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved iext ibm ipb0 ipb1 ipb2 ipb3 reserved dext dbm dpb0 dpb1 dpb2 dpb3 reset 000000 000000
system interface unit motorola mpc801 user? manual 12-23 12 iext?nstruction external transfer error acknowledge this bit is set if the cycle is terminated by an externally generated tea signal when an instruction fetch is initiated. ibm?nstruction transfer monitor timeout this bit is set if the cycle is terminated by a bus monitor timeout when an instruction fetch is initiated. ipb?nstruction parity error on byte there are four parity error status bits for each 8-bit lane. one of these is set for the byte that had a parity error when an instruction was fetched. parity check for a memory region that is not under memory controller control is enabled by the pncs bit in siumcr. dext?ata external transfer error acknowledge this bit is set if the cycle is terminated by an externally generated tea signal when a data load or store is requested by an internal master. dbm?ata transfer monitor timeout this bit is set if the cycle is terminated by a bus monitor timeout when a data load or store is requested by an internal master. dpb?ata parity error on byte there are four parity error status bits for each 8-bit lane. one of these is set for the byte that had a parity error when a data load was requested by an internal master. parity check for a memory region that is not controlled by the memory controller is enabled by the pncs bit in the siumcr. 12.12.2 system timer registers system timers are powered by keep alive power, which preserves their value when the main power supply is off. refer to section 5.10.2 the key mechanism for details on the required actions needed to guarantee data retention. 12.12.2.1 decrementer register. the 32-bit powerpc decrementer (dec) register contains values that the down counter uses to cause decrementer interrupts. the decrementer causes an interrupt whenever bit 0 changes from logic 0 to logic 1. a read of this register always returns the current count value from the down counter. the contents of this register can be read or written to by a mfspr or mtspr instruction. this register is not affected by reset. it uses standby power and continues counting when standby power is applied. dec bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field dec bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field dec
system interface unit 12-24 mpc801 user? manual motorola 12 12.12.2.2 timebase register. the 64-bit powerpc timebase (tb) register contains a 64-bit integer that is periodically incremented. since there is no automatic initialization of the tb register, the system software must perform the initialization. the contents of the register can be written by a mttbl or mttbu instruction. 12.12.2.3 timebase reference registers. there are two 32-bit, read/write timebase reference registers?breff0 and tbreff1?ssociated with the lower part of the timebase. when there is a match between the contents of the timebase and reference registers, a maskable interrupt is generated. table 12-3. standard timebase register mapping spr name description decimal spr 5:9 spr 0:4 268 01000 01100 tb read 2 read lower timebase 269 01000 01101 tbu read 2 read upper timebase 284 01000 11100 tb write 3 write lower timebase 285 01000 11101 tbu write 3 write upper timebase note: 1. extended opcode for mftb , 371 rather then 339. 2. any write ( mtspr ) to this address, results in an implementation dependent software emulation interrupt. 3. any write ( mftb ) to this address, results in an implementation dependent software emulation interrupt. tbreff0 and tbreff1 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field tbreff0 reset 1 r/w r/w addr 204 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field tbreff1 reset r/w r/w addr 208
system interface unit motorola mpc801 user? manual 12-25 12 12.12.2.4 timebase control and status register. the 16-bit, read/write timebase control and status register (tbscr) controls timebase count enable and interrupt generation. it is also used to report interrupt sources. a status bit is cleared by writing a 1 (writing a zero has no effect) and more than one bit can be cleared at a time. this register can be read at any time. tbirq?imebase interrupt request this field determines the interrupt priority level of the timebase. to specify a certain level, the appropriate bit should be set. refer to section 12.3.1 configuring the interrupt for more information. refa and refb?eference interrupt status a and b if set, these bits indicate that a match has been detected between the corresponding reference register (tbreff0 for refa and tbreff1 for refb) and the timebase low register. the bit can be cleared by writing a 1. bits 10?1?eserved these bits are reserved and should be set to 0. refae and refbe?eference interrupt enable a and b if these bits are asserted (1), the timebase generates an interrupt when the refa or refb bits are asserted. otherwise, interrupt is disabled. tbf?imebase freeze if this bit is asserted (1), the timebase and decrementer stops while freeze is asserted. tbe?imebase enable if this bit is asserted (1), the timebase and decrementer are enabled. tbscr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field tbirq refa refb reserved refae refbe tbf tbe reset 0 00 0 0000 r/w r/w r/w r/w r/w r/w r/w r/w r/w
system interface unit 12-26 mpc801 user? manual motorola 12 12.12.2.5 real-time clock status and control register. the real-time clock status and control register (rtcsc) is used to enable the different real-time clock functions and to report interrupt sources. a status bit is cleared by writing a 1 (writing a zero has no effect) and more than one status bit can be cleared at a time. this register can be read at any time. rtcirq?eal-time clock interrupt request this field controls the real-time clock interrupt priority level. refer to section 12.3.1 configuring the interrupt for details. sec?nce per second interrupt this status bit is set every second and should be cleared by the software. alr?larm interrupt this status bit is set when the value of the real-time clock is equal to the value programmed in the alarm register. 38k?eal-time clock source select if this bit is negated (0), the real-time clock assumes that it is driven by 32.768khz to generate the second pulse and if it is asserted, the real-time clock assumes 38.4khz. this bit is not affected by reset. sie?econd interrupt enable if this bit is asserted (1), the real-time clock generates an interrupt when the sec bit is asserted. ale?larm interrupt enable if this bit is asserted (1), the real-time clock generates an interrupt when the alr bit is asserted. rtf?eal-time clock freeze if this bit is asserted (1), the real-time clock stops while freeze is asserted. rte?eal-time clock enable if this bit is set, the real-time clock timers are enabled. this bit is not affected by reset. rtcsc bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rtcirq sec alr res 38k sie ale rtf rte reset 0 000 000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
system interface unit motorola mpc801 user? manual 12-27 12 12.12.2.6 real-time clock register. the 32-bit read/write real-time clock (rtc) register contains the current value of the real-time clock. 12.12.2.7 real-time clock alarm register. when the 32-bit read/write real-time clock alarm (rtcal) register has a value equal to the value programmed in the alarm register, a maskable interrupt is generated. alarm the alarm interrupt will be generated as soon as there is a match between the rtcal and rtc register value. the resolution of the alarm is 1 second. 12.12.2.8 periodic interupt status and control register. the read/write periodic interrupt status and control register (piscr) contains the interrupt request level and interrupt status bits. it also controls the 16 bits to be loaded into a modulus counter. pirq?eriodic interrupt request level this field determines the interrupt request level that will be asserted when a periodic interrupt is generated. rtc bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rtc r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rtc r/w r/w rtcal bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field alarm r/w r/w bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field alarm r/w r/w piscr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field pirq ps reserved pie pitf pte reset 0 0 0 001 r/w r/w r/w r/w r/w r/w r/w
system interface unit 12-28 mpc801 user? manual motorola 12 ps?eriodic interrupt status this bit is asserted if the periodic interrupt timer issues an interrupt. an interrupt can be issued after the modulus counter counts to zero. this bit is negated by writing a 1 (zero has no effect). bits 9?2?eserved these bits are reserved and should be set to 0. pie?eriodic interrupt enable if this bit is asserted (1), the periodic interrupt timer generates an interrupt when the ps bit is asserted. pitf?eriodic interrupt timer freeze if this bit is asserted (1), the periodic interrupt timer stops while freeze is asserted. pte?eriodic timer enable this bit controls periodic interrupt timer counting. when the timer is disabled, it maintains its old value. when the counter is enabled, it continues counting using the previous value. 0 = disable counter. 1 = enable counter. 12.12.2.9 periodic interrupt timer count register. the read/write periodic interrupt timer count (pitc) register contains the 16 bits that are to be loaded in a modulus counter. pitc?eriodic interrupt timing count this field contains the periodic timer count. if it is loaded with a $ffff value, the maximum count period is selected. pitc bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field pitc r/w r/w
system interface unit motorola mpc801 user? manual 12-29 12 12.12.2.10 periodic interrupt timer register. the read-only periodic interrupt timer register (pitr) shows the current value in the periodic interrupt down counter. writes to this register do not affect this register and reads of this register do not have any effect on the counter. pit?eriodic interrupt timing count this field contains the current count remaining in the periodic timer. writes have no effect on this field. pitr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field pit r/w r
system interface unit 12-30 mpc801 user? manual motorola 12
motorola mpc801 user? manual 13-1 13 section 13 external bus interface the mpc801 bus is synchronous, burstable, and supports multiple masters. signals driven on this bus are required to make the setup and hold time relative to the bus clock? rising edge. the bus? mpc801 architecture supports byte, half-word, and word operands that allow access to 8-,16-, and 32-bit data ports by using synchronous cycles controlled by the size outputs. accesses to 16- and 8-bit ports are made for slaves controlled by the memory controller. 13.1 features the following is a list of the bus interface? main features: 32-bit address bus with transfer size indication 32-bit data bus ttl-compatible interface bus arbitration logic on-chip supports an external master chip-select and wait state generation internally to support peripheral or static memory devices supports asynchronous and burstable memory types asynchronous dram interface support flash rom programming support compatible with powerpc architecture simple interface to slave devices bus is synchronous (all signals are referenced to the rising edge of bus clock) data parity support
external bus interface 13-2 mpc801 user? manual motorola 13 13.2 transfer signals the bus transfers information between the mpc801 and the external memory or peripheral device. external devices can accept or provide 8,16, and 32 bits in parallel and must follow the handshake protocol described later in this section. the maximum number of bits accepted or provided during a bus transfer is defined as the port width. the mpc801 contains an address bus that specifies the transfer? address and a data bus that transfers the data. control signals indicate the beginning and type of the cycle, as well as the address space and size of the transfer. the selected device then controls the length of the cycle with the signal(s) used to terminate the cycle. a strobe signal for the address bus indicates the validity of the address and provides timing information for the data. the mpc801 bus is synchronous, but the bus and control input signals must be timed to setup and hold times relative to the rising edge of the clock. in this situation, bus cycles can be completed in two clock cycles. furthermore, for all inputs, the mpc801 latches the level of the input during a sample window around the rising edge of the clock signal. this window is illustrated in figure 13-1, where tsu and tho are the input setup and hold times, respectively. to ensure that an input signal is recognized on a specific falling edge of the clock, the input must be stable during the sample window. if an input makes a transition during the window time period, the level recognized by the mpc801 is not predictable. however, the mpc801 always resolves the latched level to either a logic high or low before using it. in addition to meeting input setup and hold times for deterministic operation, all input signals must obey the protocols described in this section. figure 13-1. input sample window clock signal tho tsu sample window
external bus interface motorola mpc801 user? manual 13-3 13 13.2.1 control signals the mpc801 initiates a bus cycle by driving the address, size, address type, cycle type, and read/write outputs. at the beginning of a bus cycle, the tsiz0 and tsiz1 signals are driven with the at signals. tsiz0 and tsiz1 indicate the number of bytes to be transferred during an operand cycle that consists of one or more bus cycles. these signals are valid at the rising edge of the clock in which the ts signal is asserted. the rd/wr signal determines the direction of the transfer during a bus cycle. driven at the beginning of a bus cycle, rd/wr is valid at the rising edge of the clock in which the transfer start signal is asserted. however, rd/wr only transitions when a write cycle is preceded by a read cycle or vice versa. the signal may remain low for consecutive write cycles. figure 13-2. mpc801 bus signals a[0:31] rd / wr burst tsiz[0:1] at[0:3] sts ts bi kr /retry d[0:31] ta tea bdip dp[0:3] br bg bb cr 32 1 1 2 4 1 1 1 1 1 32 1 1 4 1 1 1 1 address and transfer attributes transfer start arbitration data transfer termination reservation protocol cycle rsv 1 ptr 1
external bus interface 13-4 mpc801 user? manual motorola 13 13.3 signal descriptions the following table describes each bus interface signal. more detailed descriptions of these signals can be found in subsequent sections of this manual. . table 13-1. mpc801 system interface unit signals mnemonic pins active i/o description address and transfer attributes a[6:31] 32 high o address bus ?riven by the mpc801 when it owns the external bus. it specifies the physical address of the bus transaction. these signals can change during a transaction when controlled by the memory controller. i used only for testing purposes. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. rd/wr 1 high o read/write ?riven by the mpc801 along with the address when it owns the external bus. driven high indicates that a read access is in progress and driven low indicates that a write access is in progress. i used only for testing purposes. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. burst 1 high o burst transfer ?riven by the mpc801 along with the address when it ?wns?the external bus. driven low indicates that a burst transfer is in progress and driven high indicates that the current transfer is not a burst. i used only for testing purposes. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. tsiz[0:1] 2 high o transfer size ?riven by the mpc801 along with the address when it owns the external bus. it specifies the data transfer size for the transaction. i used only for testing purposes. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. at[0:3] 3 high o address type ?riven by the mpc801 along with the address when it owns the external bus. it provides additional information about the address on the current transaction. i used only for testing purposes. rsv 1 high o reservation transfer ?riven by the mpc801 along with the address when it owns the external bus. it provides additional information about the address on the current transaction. i used only for testing purposes.
external bus interface motorola mpc801 user? manual 13-5 13 ptr 1 high o program trace ?riven by the mpc801 along with the address when it owns the external bus. it provides additional information about the address on the current transaction. i used only for testing purposes. bdip 1 low o burst data in progress ?riven by the mpc801 when it owns the external bus. it is part of the burst protocol. asserted indicates that the second beat in front of the current one is requested by the master. this signal is negated prior to the end of a burst to terminate the burst data phase early. i used only for testing purposes. transfer start ts 1 low o transfer start ?riven by the mpc801 when it owns the external bus.it indicates the start of a transaction on the external bus. its is input for testing purposes. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. sts 1 low o special transfer start ?riven by the mpc801 when it owns the external bus. it indicates the start of a transaction on the external bus or an internal transaction in show cycle mode. reservation protocol cr 1 low i cancel reservation ?ach core has its own signal. if it is asserted, it instructs the bus master to clear its reservation. some other master has touched its reserved space. this is a pulsed signal. kr /retry 1 low i kill reservation/retry ?hen a bus cycle is initiated by a stwcx instruction that was issued by the core to a nonlocal bus on which the storage reservation has been lost, this signal is used by the nonlocal bus interface to back-off the cycle. refer to section 13.4.9 storage reservation protocol for details. for a regular transaction, this signal is driven by the slave device to indicate that the mpc801 has to relinquish ownership of the bus and retry the cycle. table 13-1. mpc801 system interface unit signals (continued) mnemonic pins active i/o description
external bus interface 13-6 mpc801 user? manual motorola 13 data d[0:31] 32 high data bus ?he data bus has the following byte lane assignments: data byte byte lane d[0:7] 0 d[8:15] 1 d[16:23] 2 d[24:31] 3 o driven by the mpc801 when it owns the external bus and has initiated a write transaction to a slave device. for single beat transactions, if a[30:31] and tsiz[0:1] do not select the byte lanes for transfer, they will not supply valid data. i driven by the slave in a read transaction. for single beat transactions, if a[30:31] and tsiz[0:1] do not select the byte lanes for transfer, they will not be sampled by the mpc801. sampled by the mpc801 when the external master initiates a transaction and the memory controller is configured to handle external masters. dp[0:3] 4 high parity bus ?ach parity signal corresponds to each one of the data bus lanes: data bus byte parity line d[0:7] dp0 d[8:15] dp1 d[16:23] dp2 d[24:31] dp3 o driven by the mpc801 when it owns the external bus and has initiated a write transaction to a slave device. each parity signal has the parity value (even or odd) of the corresponding data bus byte. for single beat transactions, if a[30:31] and tsiz[0:1] do not select the byte lanes for transfer, they will not have a valid parity line. i driven by the slave in a read transaction. each parity signal is sampled by the mpc801 and checked (if enabled) against the expected value parity value (even or odd) of the corresponding data bus byte. for single beat transactions, if a[30:31] and tsiz[0:1] do not select the byte lanes for transfer, they will not be sampled by the mpc801 and its parity signals will not be checked. transfer cycle termination ta 1 low i transfer acknowledge ?riven by the slave device the current transaction was addressed to. it indicates that the slave has received the data on the write cycle or returned the data on the read cycle. if the transaction is a burst, ta should be asserted for each one of the transaction beats. o driven by the mpc801 when the slave device is controlled by the on-chip memory controller. table 13-1. mpc801 system interface unit signals (continued) mnemonic pins active i/o description
external bus interface motorola mpc801 user? manual 13-7 13 notes: o = output from the mpc801. i = input to the mpc801. tea 1 low i transfer error acknowledge ?riven by the slave device the current transaction was addressed to. it indicates that an error condition has occurred during the bus cycle. o driven by the mpc801 when the internal bus monitor detects an erroneous bus condition. bi 1 low i burst inhibit ?riven by the slave device the current transaction was addressed to. it indicates that the current slave does not support burst mode. o driven by the mpc801 when the slave device is controlled by the on-chip memory controller. arbitration br 1 low i bus request ?hen the internal arbiter is asserted, it indicates that an external master is requesting the bus. o driven by the mpc801 when the internal arbiter is disabled and the chip is not parked . bg 1 low o bus grant ?hen the internal arbiter is enabled, the mpc801 asserts this signal to indicate that an external master can assume ownership of the bus and begin a bus transaction. the bg signal should be qualified by the master requesting the bus to ensure it is the bus owner: qualified bg = bg & ~ bb i when the internal arbiter is disabled, the bg is sampled and properly qualified by the mpc801 when an external bus transaction is to be executed by the chip. bb 1 low o bus busy ?hen the internal arbiter is enabled, the mpc801 asserts this signal to indicate that it is the current owner of the bus. when the internal arbiter is disabled, it will assert this signal after the external arbiter grants the chip ownership of the bus and it is ready to start the transaction. i when the internal arbiter is enabled, the mpc801 samples this signal to get an indication of when the external master ended its bus tenure (bb negated). when the internal arbiter is disabled, the bb is sampled to properly qualify the bg signal when an external bus transaction is to be executed by the chip. table 13-1. mpc801 system interface unit signals (continued) mnemonic pins active i/o description
external bus interface 13-8 mpc801 user? manual motorola 13 13.4 operations on the bus the mpc801 generates a system clock output (clkout) signal that sets the frequency of operation for the bus interface. internally, the mpc801 uses a phase-lock loop (pll) circuit to generate a master clock for all of the core circuitry, including the bus interface that is phase-locked to the clkout output signal. all signals for the mpc801 bus interface are specified with respect to the rising-edge of the external clkout signal and are guaranteed to be sampled as inputs or changed as outputs with respect to that edge. since the same clock edge is referenced for driving or sampling the bus signals, the possibility of clock skew could exist between various modules in a system because of routing or using multiple clock lines. it is the responsibility of the system to handle any clock skew problems that could occur as a result of layout, lead-length, and physical routing. 13.4.1 basic transfer protocol the basic transfer protocol defines the sequence of actions that must occur on the mpc801 bus to perform a complete bus transaction. a simplified scheme of the basic transfer protocol is illustrated in figure 13-3. figure 13-3. basic transfer protocol this protocol provides an arbitration phase and an address and data transfer phase. the arbitration phase specifies the master that initiates the next transaction. the address phase specifies the address for the transaction and the transfer attributes that describe the transaction. the data phase performs the transfer of data if any is to be transferred. it can transfer a single beat of data (4 bytes or less) for nonburst operations, a 4-beat burst of data (4 4 bytes), an 8-beat burst of data (8 ? 2 bytes), or a 16-beat burst of data (16 ? 1 bytes). 13.4.2 single beat transfers during the data transfer phase, data is transferred from master to slave in write cycles or from slave to master on read cycles. on a write cycle, the master drives the data as soon as it can, but never before the cycle following the address transfer phase. to avoid electrical contention, the master considers the ?ne dead clock cycle?when switching between drivers. the master can stop driving the data bus as soon as it samples the ta signal asserted on the rising edge of the clkout signal. on a read cycle the master accepts the data bus contents as valid at the rising edge of the clkout signal in which the ta signal is sample asserted. arbitration address transfer data transfer termination
external bus interface motorola mpc801 user? manual 13-9 13 13.4.2.1 single beat read flow the basic read cycle begins with a bus arbitration, followed by the address and data transfers. the handshakes as they apply to a fixed transaction protocol are illustrated in the following diagrams. figure 13-4. simplified diagram of a single beat read cycle request bus (br ) receives bus grant (bg ) from arbiter asserts bus busy (bb ) if no other master is driving assert transfer start (ts ) drives address and attributes receives address returns data asserts transfer acknowledge (ta ) receives data slave master
external bus interface 13-10 mpc801 user? manual motorola 13 figure 13-5. single beat read cycle?asic timing?ero wait states clkout a[0:31] ts br bg bb data ta rd/wr receive bus grant and bus busy negated assert bb , drive address and assert ts data is valid burst tsiz[0:1],at[0:3]
external bus interface motorola mpc801 user? manual 13-11 13 figure 13-6. single beat read cycle?asic timing?ne wait state clkout a[0:31] ts br bg bb data ta rd/wr receive bus grant and bus busy negated assert bb , drive address and assert ts data is valid burst tsiz[0:1],at[0:3] wait state
external bus interface 13-12 mpc801 user? manual motorola 13 13.4.2.2 single beat write flow the basic write cycle begins with a bus arbitration, followed by the address data transfers. the handshakes are illustrated in the following diagrams as they apply to a fixed transaction protocol. figure 13-7. simplified flow diagram of a single beat write cycle master slave request bus (br ) receives bus grant (bg ) from arbiter asserts bus busy (bb ) if no other master is driving assert transfer start (ts ) drives address and attributes drives data asserts transfer acknowledge (ta ) interrupts data driving
external bus interface motorola mpc801 user? manual 13-13 13 figure 13-8. single beat write cycle?asic timing?ero wait states clkout a[0:31] ts br bg bb data ta rd/wr receive bus grant and bus busy negated assert bb , drive address and assert ts data is sampled burst tsiz[0:1],at[0:3]
external bus interface 13-14 mpc801 user? manual motorola 13 figure 13-9. single beat write cycle?asic timing?ne wait state clkout a[0:31] ts br bg bb data ta rd/wr receive bus grant and bus busy negated assert bb , drive address and assert ts data is sampled burst tsiz[0:1],at[0:3] wait state
external bus interface motorola mpc801 user? manual 13-15 13 a typical single beat transfer assumes that the external memory has a 32-bit port size. the mpc801 provides an effective mechanism for interfacing with 16- and 8-bit port size memories, which allows transfers to these devices when they are controlled by the internal memory controller. figure 13-10. single beat?2-bit data?rite cycle?6-bit port size basic timing clkout a[0:31] ts br bg bb data ta rd/wr burst tsiz[0:1] ps ?0 ?0 ?0 a a + 2 abcdefgh efghefgh sts
external bus interface 13-16 mpc801 user? manual motorola 13 13.4.3 burst transfers the mpc801 uses burst transfers to access 16-byte operands. a burst accesses a block of 16 bytes that is aligned to a 16-byte memory boundary by supplying a starting address that points to one of the words and requires the memory device to sequentially drive or sample each word on the data bus. the selected slave device must internally increment the a[28] and a[29] (a[30] for a 16-bit port size slave device) bits of the supplied address for each transfer, thus causing the address to wrap around at the end of the four words block. the address and transfer attributes supplied by the mpc801 remain stable during the transfers and the selected device terminates each transfer by driving or sampling the word on the data bus and asserting the ta signal. the mpc801 also supports burst-inhibited transfers for slave devices that are unable to support bursting. for this type of bus cycle, the selected slave device supplies or samples the first word the mpc801 points to and asserts the bi signal with ta for the first transfer of the burst access. the mpc801 responds by terminating the burst and accessing the remainder of the 16-byte block, thus using three read/write cycle buses (each one for a word) for a 32-bit port width slave, seven read/write cycle buses for a 16-bit port width slave, or fifteen read/write cycle buses for a 8-bit port width slave. typical burst transfers assume that the external memory has a 32-bit port size. the mpc801 provides an effective mechanism for interfacing with 16- and 8-bit port size memories that allow burst transfers to these devices when they are controlled by the internal memory controller. in this case, the mpc801 tries to initiate a burst transfer as normal. if the slave device responds a cycle before the transfer acknowledge to the first beat, its port size is 16-/8-bits and that the burst is accepted, the mpc801 completes a burst of 8/16 beats. each of the data beats of the burst transfers effectively only 2/1 bytes. it should be noted that this 8-/16-beat burst is considered an atomic transaction, so the mpc801 will not allow other unrelated master accesses or bus arbitration to intervene between the transfers. 13.4.4 the burst mechanism the mpc801 burst mechanism consists of a signal indicating that the cycle is a burst cycle, another indicating the duration of the burst data, and a signal indicating whether the slave is burstable. these signals are in addition to the basic signals of the bus. at the start of the burst transfer, the master drives the address, its attributes, and the burst signal to indicate that a burst transfer is being initiated, along with the assertion of the transfer start signal. if the slave is burstable, it negates the bi signal. if the slave cannot burst, it asserts the burst inhibit signal. during the data phase of a burst write cycle the master drives the data. it also asserts the bdip signal if it intends to drive the data beat after the current data beat. when the slave has received the data, it asserts the signal transfer acknowledge to let the master know it is ready for the next data transfer. the master again drives the next data and asserts or negates the bdip signal. if the master does not intend to drive another data beat after the current one, it negates the bdip to let the slave know the next subsequent data beat transfer is the last data of the burst write transfer. during the data phase of a burst read cycle, the master receives data from the addressed slave. if the master needs more than one data, it asserts the bdip signal. when the data is received before the last data, the master deasserts the bdip signal and the slave stops driving new data after it receives the negation of the bdip signal at the rising edge of the clock.
external bus interface motorola mpc801 user? manual 13-17 13 figure 13-11. simplified flow diagram of a burst read cycle master slave request bus (br ) receives bus grant (bg ) from arbiter asserts bus busy (bb ) if no other master is driving assert transfer start (ts ) drives address and attributes receives address returns data asserts transfer acknowledge (ta ) receives data drives burst asserted assert burst data in progress (bdip ) bdip asserted yes returns data asserts transfer acknowledge (ta ) receives data bdip asserted yes returns data asserts transfer acknowledge (ta ) receives data bdip asserted yes returns data asserts transfer acknowledge (ta ) receives data bdip asserted yes negate burst data in progress (bdip ) no don? drive data no don? drive data no don? drive data no don? drive data
external bus interface 13-18 mpc801 user? manual motorola 13 figure 13-12. burst-read cycle?2-bit port size?ero wait state clkout a[0:31],at[0:3] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip data data data data is valid is valid is valid is valid last beat expects another data ?0 ps ?0
external bus interface motorola mpc801 user? manual 13-19 13 figure 13-13. burst-read cycle?2-bit port size?ne wait state clkout a[0:31],at[0:3] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip data data data data is valid is valid is valid is valid last beat expects another data ?0 wait state ps ?0
external bus interface 13-20 mpc801 user? manual motorola 13 figure 13-14. burst-read cycle?2-bit port size?ait states between beats clkout a[0:31],at[0:3] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip data data data data is valid is valid is valid is valid last beat expects another data ?0 wait state ?0 ps
external bus interface motorola mpc801 user? manual 13-21 13 figure 13-15. burst-read cycle?6-bit port size?ne wait state between beats clkout a[0:31],at[0:3] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip ?0 ps ?0
external bus interface 13-22 mpc801 user? manual motorola 13 figure 13-16. simplified flow diagram of a burst write cycle master slave request bus (br ) receives bus grant (bg ) from arbiter asserts bus busy (bb ) if no other master is driving assert transfer start (ts ) drives address and attributes receives address asserts transfer acknowledge (ta ) drive data drives burst asserted drive data bdip asserted yes asserts transfer acknowledge (ta ) asserts transfer acknowledge (ta ) stop driving data negate burst data in progress (bdip ) no don? sample next data assert burst data in progress (bdip ) drive data bdip asserted yes asserts transfer acknowledge (ta ) no don? sample next data drive data bdip asserted yes no don? sample next data bdip asserted yes no don? sample next data
external bus interface motorola mpc801 user? manual 13-23 13 figure 13-17. burst write cycle?2-bit port size?ero wait states clkout a[0:31],at[0:3] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip data data data data is sampled is sampled is sampled is sampled last beat will drive another data ?0
external bus interface 13-24 mpc801 user? manual motorola 13 figure 13-18. burst-inhibit cycle?2-bit port size clkout a[0:27] ts br bg bb data ta rd/wr burst tsiz[0:1] bdip ?0 bi a[28:29] a[30:31] n n+1 mod 4 n+2 mod 4 n+3 mod 4
external bus interface motorola mpc801 user? manual 13-25 13 13.4.5 transfer alignment and packaging the mpc801 external bus only supports natural address alignment: byte access can have any address alignment. half-word access must have address bit 31 equal to 0. word access must have address bits 30?1 equal to 0. for burst access must have address bits 30?1 equal to 0. the mpc801 can perform operand transfers through its 32-bit data port. if the transfer is controlled by the internal memory controller, the mpc801 can support 8- and 16-bit data port sizes. the bus requires that the portion of the data bus used for a transfer to or from a particular port size be fixed. a 32-bit port must reside on data bus bits 0?1, a 16-bit port must reside on bits 0?5, and an 8-bit port must reside on bits 0?. the mpc801 always tries to transfer the maximum amount of data on all bus cycles and for a word operation it always assumes that the port is 32 bits wide when beginning the bus cycle. in figures 13-19 and 13-20 and tables 13-2 and 13-3, the following conventions are adopted: op0 is the most-significant byte of a word operand and op3 is the least-significant byte. the two bytes of a half-word operand are op0 (most-significant) and op1 or op2 (most-significant) and op3, depending on the address of the access. the single byte of a byte-length operand is op0, op1, op2, or op3, depending on the address of the access. figure 13-19. internal operand representation figure 13-20 illustrates the device connections on the data bus. op0 op1 op2 0 31 word half-word byte op0 op1 op2 op3 op0 op1 op2 op3 op3
external bus interface 13-26 mpc801 user? manual motorola 13 figure 13-20. interface to different port size devices table 13-2 lists the bytes required for read cycles on the data bus. note: ?denotes a byte not required during that read cycle. table 13-2. data bus requirements for read cycles transfer size tsize address 32-bit port size 16-bit port size 8-bit port size a[30] a[31] d[0:7] d[8:15] d[16:23] d[24:31] d[0:7] d[8:15] d[0:7] byte 0 1 0 0 op0 op0 op0 0 1 0 1 op1 op1 op1 0 1 1 0 op2 op2 op2 0 1 1 1 op3 op3 op3 half-word 1 0 0 0 op0 op1 op0 op1 op0 1 0 1 0 op2 op3 op2 op3 op2 word 0 0 0 0 op0 op1 op2 op3 op0 op1 op0 0 31 32-bit port size op0 op1 op2 op3 op0 op1 op2 op3 op0 op1 op2 op3 op0 op1 op2 op3 16-bit port size 8-bit port size d[0:7] d[8:15] d[16:23] d[24:31] interface output register
external bus interface motorola mpc801 user? manual 13-27 13 table 13-3 lists the patterns of the data transfer for write cycles when accesses are initiated by the mpc801. note: ?denotes a byte not required during that read cycle. 13.4.6 arbitration phase signals the external bus design provides for a single bus master, either the mpc801 or an external device. one or more of the external devices on the bus has the capability of becoming bus master for the external bus. bus arbitration can be handled either by an external central bus arbiter or by the internal on-chip arbiter. in the latter case, the system is optimized for one external bus master besides the mpc801. the external or internal arbitration configuration is set at system reset. see section 15.3 external master support for more information. each bus master must have bus request, bus grant, and bus busy signals. the device that needs the bus asserts the br signal. the device then waits for the arbiter to assert a bg signal. in addition, the new master must look at the bb signal to ensure that no other master is driving the bus before it can assert bus busy and assume ownership of the bus. if the arbiter has taken the bus grant away from the master and the master wants to execute a new cycle, the master must rearbitrate before a new cycle can be made. the mpc801, however, guarantees data coherency for access to a small port size and decomposed bursts. this means that the mpc801 will not release the bus before the transactions that are considered atomic complete. figure 13-21 describes the basic protocol for bus arbitration. see section 12.12.1.1 siu module configuration register for details. table 13-3. data bus contents for write cycles transfer size tsize address external data bus pattern a[30] a[31] d[0:7] d[8:15] d[16:23] d[24:31] byte 0100 op0 0101 op1 op1 0110 op2 op2 0111 op3 op3 op3 half-word 1000 op0 op1 1010 op2 op3 op2 op3 word 0000 op0 op1 op2 op3
external bus interface 13-28 mpc801 user? manual motorola 13 figure 13-21. bus arbitration flowchart 13.4.6.1 bus request the potential bus master asserts the br signal to request bus mastership. br should be negated once the bus is granted, the bus is not busy, and the new master can drive the bus. if more requests are pending, the master can keep asserting its bus request as long as needed. when configured for external central arbitration, the mpc801 drives this signal when it requests bus mastership. when the internal on-chip arbiter is used, this signal is an input to the internal arbiter and should be driven by the external bus master. 13.4.6.2 bus grant the bg signal is asserted by the arbiter to indicate that the bus is granted to the requesting device. this signal can be negated after the br signal is negated or kept asserted for the current master to park the bus. when configured for external central arbitration, bg is an input signal to the mpc801 from the external arbiter. when the internal on-chip arbiter is used, this signal is an output from the internal arbiter to the external bus master. requesting device arbiter request the bus 1. assert br terminate arbitration 1. negate bg (may choose to 1. wait for bb to be 3. negate br keep it asserted to park bus master) operate as bus master 1. preform data transfer release bus mastership 1. negate bb acknowledge bus mastership negated 2. assert bb to become next master grant bus arbitration 1. assert bg
external bus interface motorola mpc801 user? manual 13-29 13 13.4.6.3 bus busy the bb signal indicates that the current bus master is using the bus. new masters should not begin transferring until this signal is deasserted. the bus owner should not relinquish or negate this signal until its transfer is complete. to avoid contention on the bb signal, masters should three-state this signal when it gets a logical ??value. this situation implies that the connection of an external pull-up resistor is needed to ensure that a master acquiring the bus can recognize the negated bb signal, regardless of how many cycles have passed since the previous master relinquished the bus. refer to figure 13-22 for more information. figure 13-22. basic connection of the master signal external bus mpc801 slave 2 master ts bb
external bus interface 13-30 mpc801 user? manual motorola 13 figure 13-23. bus arbitration timing diagram clkout br0 bg1 addr + attr bg0 br1 master 0 ?urns on and master 0 negates bb and ?urns off drives signals bb ts ta master 1 ?urns on and drives signals
external bus interface motorola mpc801 user? manual 13-31 13 at system reset, the mpc801 can be configured to use the internal bus arbiter and it will be parked on the bus. the priority of the external device relative to the internal mpc801 bus masters is programmed in the siu module configuration register. if the external device requests the bus and the mpc801 does not need it or the external device has priority over the current internal bus master, the mpc801 grants the bus to the external device. figure 13-24 illustrates the internal finite state machine that implements the arbiter protocol. figure 13-24. internal bus arbitration state machine idle bg = 1 bb = t.s ext owner bg = 0 ext master br = 0 ext master release bus 801 bus wait bg = 1 bb = t.s bb = t.s bb = 0 801 owner bg = 1 bb = 0 bb = 1 bb = 1, br =1 br = 0 requests bus br = 1 external device which has higher priority than the current internal bus master requests the bus mpc801 internal master with higher priority than the external device requires the bus mpc801 needs mpc801 no longer the bus needs the bus mpc801 still needs the bus
external bus interface 13-32 mpc801 user? manual motorola 13 13.4.7 address transfer phase-related signals 13.4.7.1 transfer start the ts signal indicates the beginning of a transaction on a bus that is addressing a slave device. this signal should be asserted by a master only after ownership of the bus is granted by the arbitration protocol. it is only asserted for the first cycle of the transaction and is negated in the successive clock cycles until the end of the transaction. the master should three-state this signal when it relinquishes the bus to avoid contention between two or more masters in this signal. this situation indicates that an external pull-up resistor should be connected to the ts signal to keep a slave from recognizing this asserted signal when no master drives it. refer to figure 13-22 for more information. 13.4.7.2 address bus the 32-bit address bus consists of address bits 0?1 and bit 0 is the most-significant bit. the bus is byte addressable, so each address can address one or more bytes. the address and its attributes are driven on the bus with the transfer start signal and stay valid until the bus master received a signal transfer acknowledge from the slave. to distinguish the individual byte, the slave device must observe the tsiz signals. 13.4.7.3 transfer attributes the transfer attributes include the rd/wr , burst , tsiz[0:1], at[0:3], sts , and bdip signals. these signals, except bdip , are available at the same time as the address bus. 13.4.7.3.1 read/write. when the rd/wr signal is high, it indicates a read access and low indicates a write access. 13.4.7.3.2 burst indicator. when the burst signal is driven by the bus master at the beginning of the bus cycle to indicate that the transfer is a burst transfer. the burst size is always 16 bytes long. for a 32-bit port size, the burst includes 4 beats. when the port size is 16 bits and controlled by the internal memory controller, the burst includes 8 beats. when the port size is 8 bits and controlled by the internal memory controller, the burst includes 16 beats. the mpc801 bus supports critical data first access for fixed-size burst. the order of the wraparound wraps back to data 0. for example: case burst of four?ata 0 t data 1 t data 2 t data 3 t data 0 case burst of eight?ata 0 t data 1 t data 2 t ......... t data 6 t data 7 t data 0 13.4.7.3.3 transfer size. the tsiz signals indicate the size of the requested data transfer. the tsiz signals can be used with burst and a[30:31] to determine which byte lanes of the data bus are involved in the transfer. for nonburst transfers, the tsiz signals specify the number of bytes starting from the byte location addressed by a[30:31]. in burst transfers, the value of the tsiz signal is always 00.
external bus interface motorola mpc801 user? manual 13-33 13 13.4.7.3.4 address types. the a[0:3], ptr , and rsv signals are outputs that indicate one of 16 ?ddress types?to which the address applies. these types are designated as either a normal/alternate master cycle, problem/privilege, and instruction/data types. the address type signals are valid at the rising edge of the clock in which the sts signal is asserted. address type signals reflect the current status of the master originating the access, not necessarily the status in which the original access to this location has occurred. an example of this situation is when a copyback of a dirty line in the data cache occurs after the privilege state of the processor has been changed since the last access to the same line. functional usage of the at[0:3], ptr and rsv signals is for the reservation protocol described in section 13.4.9 storage reservation protocol . table 13-5 provides the space definition encoded by the sts , ts , at[0:3], ptr , and rsv signals. table 13-4. burst /tsize encoding burst tsiz transfer size n 01 byte n 10 half-word n11 x n 00 word a 00 burst (16 bytes)
external bus interface 13-34 mpc801 user? manual motorola 13 table 13-5. definitions of address types sts ts at0 at1 at2 at3 ptr rsv address space definitions problem state/ privilege state instruction/ data reservation/ program trace program trace reservation 1 x x x x x 1 1 no transfer or no first transaction of a transfer 0 x x x x x x x start of a transaction x 0 0 0 0 0 0 1 core, normal instruction, program trace, privilege state 1 1 1 core, normal instruction, privilege state 1 0 1 0 core, reservation data, privilege state 1 1 1 core, normal data, privilege state 1 0 0 0 1 core, normal instruction, program trace, problem trace 1 1 1 core, normal instruction, problem state 1 0 1 0 core, reservation data, problem state 1 1 1 core, normal data, problem state 1 ch0 ch1 ch2 1 1 no core, normal, (ch indicates channel number) 0 0 0 0 0 1 core, show cycle address instruction, program trace, privilege state 1 1 1 core, show cycle address instruction, privilege state 1 0 1 0 core, reservation show cycle data, privilege state 1 1 1 core, show cycle data, privilege state 1 0 0 0 1 core, show cycle address instruction, program trace, problem state 1 1 1 core, show cycle address instruction, problem state 1 0 1 0 core, reservation show cycle data, problem state 1 1 1 core, show cycle data, problem state 1 ch0 ch1 ch2 1 1 no core, show cycle data (ch indicates channel number)
external bus interface motorola mpc801 user? manual 13-35 13 show cycles are accesses to the core? internal bus devices. these accesses are driven externally for emulation, visibility, and debugging purposes. a show cycle can have one address phase and one data phase or just an address phase for the instruction show cycles. the cycle can be a write or read access and the data for both the read and write accesses should be driven by the bus master. this is different than the normal bus read and write accesses. the address of the show cycle should be valid on the bus for one clock and the data of the show cycle should be valid on the bus for one clock. the data phase should not require a transfer acknowledge to terminate the bus-show cycle. in a burst-show cycle only the first data beat will be shown externally. 13.4.7.3.5 burst data in progress. the bdip signal is sent from the master to the slave to indicate that there is a data beat following the current data beat. the master uses this signal to give the slave an advanced warning of the remaining data in the burst. this signal can also be used to terminate the burst cycle early during a burst. refer to section 13.4.2 single beat transfers and section 13.4.4 the burst mechanism for more information. 13.4.8 termination signals 13.4.8.1 transfer acknowledge the ta signal indicates that a bus transfer has completed normally. during a burst cycle, the slave asserts this signal with every data beat returned or accepted. 13.4.8.2 burst inhibit the bi signal is sent from the slave to the master to indicate that the addressed device does not have burst capability. if this signal is asserted, the master must transfer in multiple cycles and increment the address for the slave to complete the burst transfer. for a system that does not use the burst mode at all, this signal can be permanently tied to a low. 13.4.8.3 transfer error acknowledge the tea signal terminates the bus cycle under bus error condition(s). the current bus cycle should be aborted. this signal should override any other cycle termination signals, such as transfer acknowledge. 13.4.8.4 protocol for termination signals the transfer protocol was defined to avoid electrical contention on signals that can be driven by various sources. to do that, a slave should not drive signals associated with the data transfer until the address phase is completed and it recognizes the address as its own. the slave should disconnect from signals immediately after it has acknowledged the cycle and no later than the termination of the next address phase cycle. this indicates that the termination signals should be connected to the power through a pull-up resistor to avoid a situation in which a master samples an undefined value in any of these signals when no real slave is addressed. refer to figures 13-25 and 13-26 for more information. table 13-6 summarizes how the mpc801 recognizes the termination signals provided by the slave device that the initiated transfer addressed.
external bus interface 13-36 mpc801 user? manual motorola 13 figure 13-25. termination signals protocol basic connection table 13-6. termination signal protocol tea ta retry /kr result asserted x x transfer error termination negated asserted x normal transfer termination negated negated asserted retry transfer termination / kill reservation external bus mpc801 slave 2 slave 1 acknowledge signals
external bus interface motorola mpc801 user? manual 13-37 13 figure 13-26. termination signals protocol timing diagram 13.4.9 storage reservation protocol the mpc801 storage reservation protocol supports multilevel bus structure. for each local bus, storage reservation is handled by the local reservation logic. the protocol tries to optimize reservation cancellation so that a powerpc processor is notified of storage reservation loss on a remote bus only when it has issued a stwcx cycle to that address. in other words, the reservation loss indication comes as part of the stwcx cycle. this method avoids the need to have fast storage reservation loss indication signals routed from every remote bus to every powerpc master. the storage reservation protocol makes the following assumptions: each ?rocessor?has, at most, one reservation ?lag? lwarx sets the reservation ?lag? lwarx by the same processor clears the reservation ?lag?related to a previous lwarx instruction and again sets the reservation ?lag? stwcx by the same processor clears the reservation ?lag? store by the same processor does not clear the reservation ?lag? clkout a(0:31) ts ta , bi , tea rd/wr tsiz[0:1] slave 1 slave 2 slave 1 allowed to drive slave 1 negates acknowledge signals and turns off acknowledge signals slave 2 allowed to drive slave 2 negates acknowledge signals and turns off acknowledge signals data
external bus interface 13-38 mpc801 user? manual motorola 13 some other processor (or other mechanism) store to the same address as an existing reservation clears the reservation ?lag? if the storage reservation is lost, it is guaranteed that stwcx will not modify the storage. the reservation protocol for a single-level (local) bus is illustrated in figure 13-27. it assumes that an external logic on the bus carries out the following functions: snoops accesses to all local bus slaves. holds one reservation for each local master capable of storage reservations. sets the reservation when that master issues a load and reserve request. clears the reservation when some other master issues a store to the reservation address. figure 13-27. reservation on a local bus the cr signal is sampled by the mpc801 at the rising edge of the clkout. when this signal is asserted, the reservation ?lag?is reset. the external bus interface samples the logical value of the reservation ?lag?prior to externally starting a bus cycle initiated by a stwcx instruction in the core. if the reservation ?lag?is set, the external bus interface begins with the bus cycle and if it is reset, no bus cycle is initiated externally and this situation is reported to the core. s r reservation logic external bus i / f lwarx q enable external stwcx access cr external bus mpc801 master bus a[0:31] cr clkout at[0:3], rsv ,r/w ,ts
external bus interface motorola mpc801 user? manual 13-39 13 the reservation protocol for a multi-level (local) bus is illustrated in figure 13-28. the system describes the situation in which the reserved location is sited in the remote bus. in this case, the bus? interface block implements a reservation ?lag?for the local bus master. the reservation ?lag?is set by the bus? interface when a load with reservation is issued by the local bus master and the reservation address is located on the remote bus. the ?lag?is reset when an alternative master on the remote bus accesses the same location in a write cycle. if the mpc801 begins a memory cycle to the previously reserved address (located in the remote bus) as a result of a stwcx instruction, the following two situations can occur: if the reservation ?lag?is set, the bus? interface acknowledges the cycle in a normal way and if it is reset, the bus? interface should assert the kr . the bus? interface should either perform the remote bus write access or abort it if the remote bus supports aborted cycles. in this situation, failure of the stwcx instruction is reported to the core. figure 13-28. reservation on multilevel bus hierarchy s r buses i / f external bus i / f q kr external bus (local bus) mpc801 at[0:3], rsv , r/w , ts a[0:31] remote bus master in the remote bus write to the reserved location
external bus interface 13-40 mpc801 user? manual motorola 13 13.4.10 exception control cycles the mpc801 bus architecture requires the ta signal to be asserted from an external device to indicate bus cycle completion. ta is not asserted when one of the following conditions occur: the external device does not respond other application-dependent errors occur the external circuitry can provide tea when no device responds by asserting ta within an appropriate period of time after the mpc801 initiates the bus cycle. this allows the cycle to terminate and the processor to enter exception processing for the error condition, whereas each of the internal masters causes an internal interrupt. to properly control the termination of a bus cycle for a bus error, the tea signal must be asserted simultaneously or before ta is asserted. tea should be negated before the second rising edge after it was sample-asserted to avoid an error for the next initiated bus cycle. tea is an open-drain pin that allows the ?ire-or?of any different error generation sources. 13.4.10.1 retry when an external device asserts the retry signal during a bus cycle, the mpc801 enters a sequence in which it terminates the current transaction, relinquishes the ownership of the bus, and retries the cycle using the same address, address attributes, and data (for a write cycle). figure 13-29 illustrates the behavior of the mpc801 when the retry signal is found as a termination of a transfer. in the figure, it is illustrated that when the internal arbiter is enabled, mpc801 negates the bb signal and asserts the bg signal in the clock cycle following the retry detection. this allows any external master to gain bus ownership. in the next clock cycle, a normal arbitration procedure occurs again. the figure also illustrates that the external master did not use the bus, so the mpc801 initiates a new transfer with the same address and attributes as before. in figure 13-30 the same situation is illustrated to show that the mpc801 is working with an external arbiter. if the clock cycle after the retry signal is asserted, the br signal is negated together with the bb signal. one clock cycle later, the normal arbitration procedure occurs again.
external bus interface motorola mpc801 user? manual 13-41 13 figure 13-29. retry transfer timing?nternal arbiter clkout a[0:31] ts br bg (output) bb data ta rd/wr burst tsiz[0:1] retry aa allow external master to gain the bus
external bus interface 13-42 mpc801 user? manual motorola 13 figure 13-30. retry transfer timing?xternal arbiter when the mpc801 initiates a burst access, the bus interface only recognizes the retry assertion as a retry termination if it detects it before the first data beat is acknowledged by the slave device. when the retry signal is asserted as a termination signal on the second or third data beat of the access (being the first data beat acknowledged by a normal ta assertion), the mpc801 recognizes it as a transfer error acknowledge. clkout a[0:31] ts br (output) bg bb data ta rd/wr burst tsiz[0:1] retry aa allow external master to gain the bus
external bus interface motorola mpc801 user? manual 13-43 13 figure 13-31. retry on burst cycle if a burst access is acknowledged on its first beat with a normal ta , but with the bi signal asserted, the following ?ingle beat?transfers initiated by the mpc801 to complete the 16-byte transfers recognize the retry signal assertion as a transfer error acknowledge. clkout a[0:31] ts br bg (output) bb data ta rd/wr burst tsiz[0:1] retry aa allow external master to gain the bus bi if asserted will cause transfer error
external bus interface 13-44 mpc801 user? manual motorola 13
motorola mpc801 user? manual 14-1 14 section 14 endian modes a general description of the different endian modes can be found in the powerpc microprocessor family: the programming environments (mpcfpe/ad) manual that is available from motorola. the mpc801 supports three different system endian configurations: little-endian system big-endian system powerpc little-endian system the term system refers to the devices that reside on the mpc801 bus. the mpc801 core operates in the big-endian mode of a big-endian system and in the powerpc little-endian mode of two other configurations. to program the configurations, refer to the table below. table 14-1. powerpc little-endian effective address modification for individually aligned scalar data length (bytes) address modification: 1 xor with 0b111 2 xor with 0b110 4 xor with 0b100 8 (no change) note: there are no 8-byte scalars in the mpc801. table 14-2. endian mode programming for core data structures mode msr le (and msr ile ) dccst les big-endian mode 0 0 little-endian mode 0 1 powerpc little-endian mode 1 0 reserved 1 1
endian modes 14-2 mpc801 user? manual motorola 14 the following hardware operations support the different endian modes: address munging in the core is controlled by the msr le bit. the mpc801 internal bus signal is driven by the master that informs the system interface unit to swap and perform address demunging or leave the current access as it is. table 13-1 defines the dccst les bit for core and cache accesses. figure 14-1. general mpc801 system diagram note a pci bridge cannot be used in the little-endian system. 14.1 little-endian system features the following is a list of the little-endian system? main features. system memory organization and e-bus format is little-endian u-bus data, instruction cache, data cache, and internal memory format is big-endian contains data access constraints, according to the powerpc little-endian rules. same byte order between the media and system memory for core accesses, swap and address demunging are performed by the system interface unit on the u-bus ? system path the core load/store unit swapper uses munged addresses to put the data on the right byte lanes when an access of half-word or byte is performed core system cpm internal i / o system memory memory u-bus e-bus pci i / f pci i / o mpc801 interface unit
endian modes motorola mpc801 user? manual 14-3 14 the following tables describe little-endian program/data in the little-endian system that is built around the mpc801 for various port sizes. table 14-3. little-endian program/data path between the register and 32-bit memory fetch load store type little- endian addr u-bus and caches addr external bus addr data in the register u-bus and caches format e-bus format little-endian program/data 0123012301233210 word 0 0 0 11 12 13 14 11 12 13 14 14 13 12 11 11 12 13 14 half-word 0 2 0 21 22 21 22 22 21 21 22 half-word 2 0 2 31 32 31 32 32 31 31 32 byte 0 3 0 ? ? ? ? byte 1 2 1 ? ? ? ? byte 2 1 2 ? ? ? ? byte 3 0 3 ? ? ? ? table 14-4. little-endian program/data path between the register and 16-bit memory fetch/ load store type little- endian addr u-bus and caches addr external bus addr data in the register u-bus and caches format e-bus format little-endian program/data 0123012301233210 word 0 0 0 2 11 12 13 14 11 12 13 14 14 12 13 11 13 11 14 12 half-word 0 2 0 21 22 21 22 22 21 21 22 half-word 2 0 2 31 32 31 32 32 31 31 32 byte 0 3 0 ? ? ? ? byte 1 2 1 ? ? ? ? byte 2 1 2 ? ? ? ? byte 3 0 3 ? ? ? ?
endian modes 14-4 mpc801 user? manual motorola 14 14.2 big-endian system features the following is a list of the big-endian system? main features: caches, u-bus, e-bus, system memory, and i/o organization format is big-endian same byte order between the media and system memory the pci bridge can operate in big-endian mode 14.3 powerpc little-endian system features the following is a list of the powerpc little-endian system? main features: caches, u-bus, e-bus, system memory, and e-bus attached i/o organization format is big-endian. pci bus format is little-endian contains data access constraints, according to the powerpc little-endian rules. address munging in the core, according to table 14-1. the pci bridge operates in the little-endian mode as needed. in this case, swap and address demunging is performed by the pci bridge on the pci i/o ? system memory path. the stream hit mechanisms of the instruction and data caches operate less efficiently when address munging is performed on the cache accesses. therefore, you should expect some performance degradation when you are working in this mode. table 14-5. little-endian program/data path between the register and 8-bit memory fetch/ load store type little- endian addr u-bus and caches addr external bus addr data in the register u-bus and caches format e-bus format little-endian program/data 0123012301233210 word 0 0 0 1 2 3 11 12 13 14 11 12 13 14 14 13 12 11 14 13 12 11 half-word 0 2 0 1 21 22 21 22 22 21 22 21 half-word 2 0 2 3 31 32 31 32 32 31 32 31 byte 0 3 0 ? ? ? ? byte 1 2 1 ? ? ? ? byte 2 1 2 ? ? ? ? byte 3 0 3 ? ? ? ?
endian modes motorola mpc801 user? manual 14-5 14 14.4 setting the endian mode of operation dynamic switching between the endian modes is not effectively supported. the mode should be set early in the reset routine and remain that way. the mpc801 core is in big-endian mode after reset. to switch between the endian modes of operation, the core should run in the serialized mode and the caches should be disabled. to transfer the system to the powerpc little-endian mode, the msr le and msr ile bits should be changed by using the mtmsr instruction that resides (preferably) in a physical address ended by 3?100. the instruction executed next is fetched from this address plus 8. if the instruction resides in an address ending with 3?000, then this instruction is executed twice because of address munging. the instruction to transfer the system back to the big-endian resides in an address ended by 3?000. the next instruction is fetched from this address plus 12. transferring to the little-endian mode (setting of bit dccst les in the data cache) should be performed by the mtspr instruction that resides at an address ending with 3?000. further instructions should reside in the little-endian format of the external system memory and in the big-endian format of the internal memory if it exists.
endian modes 14-6 mpc801 user? manual motorola 14
motorola mpc801 user? manual 15-1 15 section 15 memory controller the memory controller controls a maximum of eight memory banks. it supports a glueless interface to sram, eprom, flash eprom, regular dram devices, self-refresh drams, extended data output dram devices, synchronous drams, and other peripherals. the flexibility of the memory controller allows you to implement memory systems with very specific timing requirements. it supports external address multiplexing, periodic timers, and timing generation for row and column address strobes to create a glueless interface to dram devices. the periodic timers allow refresh cycles to be initiated while the address muxing provides row and column addresses. you can define different timing patterns for the control signals that govern a memory device. these patterns show how the external control signals behave in read-access, write-access, burst read-access, burst write-access requests, or when the periodic timers reach the maximum programmed value for refresh operation. 15.1 features the following list summarizes the main features of the memory controller: supports a maximum of eight memory banks provides a general-purpose chip-select machine provides two user-programmable machines
memory controller 15-2 mpc801 user? manual motorola 15 figure 15-1. memory controller block diagram user programmable machine option register (or) base register (br) option register (or) base register (br) option register (or) base register (br) option register (or) option register (or) base register (br) option register (or) base register (br) option register (or) base register (br) option register (or) general-purpose chip-select machine wait state counter attributes scy[0:3] user- programmable machine memory periodic timer memory command register (mcr) memory data register (mdr) memory disable timer upm register (upmr) turn on disable timer enable upm access request upm access acknowledge memory status register (msr) upm access request upm command burst, read/write address latch multiplexer and incrementor na amx parity logic parity error wp prty[0:3] d[0:31] (command) upm arbiter done expired load cs [0:7] we [03] oe cs [0:7] bs_a [0:3] bs_b [0:3] gpl [0:5] ta dlt3 (internal) upwait base register (br) base register (br) address[0:16], at[0:2]
memory controller motorola mpc801 user? manual 15-3 15 15.2 basic architecture the memory controller consists of three machines: general-purpose chip-select machine user-programmable machine a user-programmable machine b each bank can be assigned to any one of these machines via the ms bits in the base register as illustrated in figure 15-3. when an access to one of the memory banks is initiated, the corresponding machine takes ownership of the external signals that control access until the cycle terminates. the general-purpose chip-select machine provides a glueless interface to eprom, sram, flash eprom, and other peripherals. the general-purpose chip-selects are available on the cs [0:7] signals. cs0 is also the global (boot) chip-select that is used to access the boot eprom. the chip-select allows 0 to 30 wait states. some features are common to all eight memory banks. the full 32-bit decode is available, even if all 32 address bits are not visible outside the mpc801. since there is only a 26-bit address bus, the memory controller related to the external master address has a 32-bit address whose six most-significant bit s are equal to 0. the memory controller only uses 17 most-significant bit addresses for address decoding. each memory bank includes a variable block size of 32k or 64k at a maximum of 256m. parity can be generated and checked for any memory bank and each memory bank can be selected for read-only or read/write operation. for system protection purposes, accessing a memory bank can be restricted to certain address type codes. for additional flexibility, address type comparison provides a mask option. the memory controller functionality allows the design of mpc801-based systems with little or no glue logic required. in figure 15-2, cs0 is used as the 16-bit boot eprom and cs1 is used for the 32-bit dram as the ras signal. the bs_a [0:3] signals are used as the cas signals on the dram.
memory controller 15-4 mpc801 user? manual motorola 15 figure 15-2. mpc801 simple system configuration the two user-programmable machines?pma and upmb?n the memory controller provide a flexible interface to many types of memory devices. each one can simultaneously control the address multiplexing necessary to access dram devices, the timing of the bs signals, and the timing of the gpl signals. each memory bank can be assigned to any user-programmable machine, so that each one controls eight cs signals. each user-programmable machine (upm) is a ram-based machine controlled by the software. the software toggles the memory controller external signals when an external single word read/write access or an external burst read/write access is initiated by an internal or external master. the user-programmable machine also controls address multiplexing, address increment, and transfer acknowledge assertion for a specific memory access. the upm can be programmed to run a specific pattern consisting of a specific number of clock cycles. at every clock cycle, the logical value of the external signals specified in the ram is output on the corresponding pins. when a new access to external memory is requested by any of the internal or external masters, the address of the transfer and the address type is compared to each one of the valid banks defined in the memory controller. notice that 17 of the address bits and three of the address type bits are maskable. ce oe w eprom address we data dram address ras cas [0:3] data parity mpc801 cs1 we [0:1] rd/wr gpl1 /oe prty[0:3] address data cs0 bs_a [0:3]
memory controller motorola mpc801 user? manual 15-5 15 figure 15-3. memory controller machine selection when an address match is found in one of the memory bank? chip-select ranges, the base register? ms bits define the machine that handles the memory access. see figure 15-4 for details. the memory controller provides four prty signals, one for each data byte on the mpc801 system bus.the parity on the bus is only checked if the memory bank accessed in the current transaction has parity enabled. parity checking/generation can be enabled for a specific memory bank in the base register. the type of parity is defined in the siu module configuration register. also, system protection is provided by defining each memory bank as read-only or read/write. user-programmable user-programmable general-purpose bank 0 bank 1 bank 2 bank 3 bank 4 bank 5 bank 6 bank 7 ms ms ms ms ms ms ms ms machine a machine b machine chip-select
memory controller 15-6 mpc801 user? manual motorola 15 figure 15-4. memory controller basic operation 15.2.1 registers associated with the memory controller the status bits for each one of the memory banks are in the memory controller status (mstat) register and there is only one mstat for the entire memory controller. each memory bank has a base register (br) and an option register (or). the mstat register reports write-protect violations that occur and parity errors for every bank. the br x and or x registers are specific memory to bank x . the br contains a v bit that indicates when there is valid register information for that chip-select. each of the option registers define the attributes for the general-purpose chip-select machine when the corresponding bank is accessed. the option registers also define the initial address multiplexing for a memory cycle controlled by a user-programmable machine. the machine a mode register (mamr) and machine b mode register (mbmr) define most of the global features for the user-programmable machines. the memory command register (mcr) and memory data register (mdr) are used to initialize the user-programmable machine? ram and to specify which pattern the software must run. the memory address register (mar) allows a specific pattern to output this register? data to the address pins. external signals timing generator external memory access request programmable machine a general-purpose chip-select external signals timing generator ms address comparator bank select mux external signals address, address type burst, rd/wr user- programmable machine b user- machine
memory controller motorola mpc801 user? manual 15-7 15 15.2.1.1 8-, 16-, and 32-bit port size configuration . the memory controller supports multiple port sizes. predefined 8-bit ports can be accessed as odd or even bytes, predefined 16-bit ports can be accessed as odd or even bytes and even half-words on data bus bits 0 through 15. predefined 32-bit ports can be accessed as odd bytes, even bytes, odd half-words, even half-words, or words on word boundaries. the port size is specified by the ps bits in the base register. 15.2.1.2 write-protect configuration . the wp bit of the base register restricts write access to a certain address range. any attempt to write to this area results in the wper bit being set in the mstat register. 15.2.1.3 address and address space checking . the defined base address is written to the base register. the address mask bits for that address are written to the option register. the address type access value, if preferred, is written to the at bits in the base register. the atm bits in the option register can be used to mask this selection. if address type checking is not preferred, the atm bits should be programmed to zero. each time an external bus cycle access is requested, the address and its corresponding address type is compared with each one of the banks. if a match is found on one of the memory controller banks, the attributes defined for that bank in the base and option registers are used to control the memory access. if a match is found in more than one bank, the lowest number bank matched handles the memory access. note when external masters access slaves on the bus, the internal at[0:2] signals to the memory controller are forced to ?00? 15.2.1.4 parity generation and checking . parity can be configured for any bank. it is generated and checked on a per-byte basis using the prty[0:3] signals for the bank if the pare bit is set in the base register. the opar bit determines the type of parity?dd or even. any parity error results in the assertion and interrupt generation of the associated per x bit in the mstat register. refer to section 12.12.1.5 transfer error status register for details. 15.2.1.5 transfer error acknowledge generation . an internal transfer error indication signal is asserted by the memory controller when a parity error occurs or by the bus monitor of the system interface unit as the result of a write-protect violation. 15.2.2 the general-purpose chip-select machine the general-purpose chip-select machine (gpcm) allows a glueless and flexible interface between the mpc801 and sram, eprom, feprom, rom devices, and external peripherals. if the ms bits in the br x of the selected bank select the general-purpose chip-select machine, the attributes for the memory cycle initiated are taken from the or x register. these attributes include the csnt, acs, scy, trlx, ehtr, and seta fields.
memory controller 15-8 mpc801 user? manual motorola 15 anywhere from 0 to 30 wait states can be programmed for ta generation. the we signals are available for each byte that is written to memory. an oe signal is provided to eliminate external glue logic. the memory banks selected to operate with the general-purpose chip-select machine have features unique to that machine. on system reset, a global (boot) chip-select is available to provide a boot rom chip-select before the system is fully con?ured. next, the banks selected to operate with the general-purpose chip-select machine support an option to output the cs signal at different timings with respect to the external address bus. cs can be output in one of the following con?urations: simultaneous with an external address one quarter of a clock later one half of a clock later this depends on the value of the acs ?ld, plus an additional cycle if the trlx bit is set. the general-purpose chip-select machine allows you to connect to devices that have long disconnect times on data by delaying new bus transactions addressing other memory banks for additional clock cycles. finally, the banks selected to operate with the general-purpose chip-select machine support external cycle termination by sensing the ta signal that is asserted by the addressed external slave. figure 15-5. mpc801 gpcm?emory devices interface figure 15-5 describes the basic connection between the mpc801 and a ?tatic?memory device. in this case, cs x is connected directly to the ce signal of the memory device. the we signals are connected to the respective w pin in the memory device where each we signal corresponds to a different data byte. as illustrated in figure 15-6, the cs x timing is the same as the address lines output. the strobes for the transaction are supplied by the oe or we signals, depending on the transaction direction (read or write). this cs timing is generated when the acs bits in the corresponding or x are set to ?0? memory mpc801 address ce oe w data address cs x oe we data
memory controller motorola mpc801 user? manual 15-9 15 figure 15-6. mpc801 gpcm?emory device basic timing (acs = 00,trlx = 0) figure 15-7 illustrates the basic connection between the mpc801 and an external peripheral device. in this case cs x is connected directly to the ce signal of the memory device and the r/w signal is connected to the respective r/w in the peripheral device. in this situation, the cs x signal is the strobe output for the memory access. figure 15-7. mpc801 gpcm?eripheral device interface clock address cs we oe data ts ta csnt =? peripheral mpc801 address ce r/w data address cs x r/w data
memory controller 15-10 mpc801 user? manual motorola 15 figure 15-8 illustrates the cs x timing as defined by the setup time required between the address and ce signals. the mpc801 memory controller allows you to specify the cs timing to meet this requirement through the acs field of the option register. figure 15-8. mpc801 gpcm?eripheral device basic timing (acs = 10, acs = 11,trlx = 0) the general-purpose chip-select machine also provides an attribute that controls the negation timing of the appropriate strobe in write cycles. when this attribute is asserted, the strobe is negated one quarter of a clock before the normal case. for example, when acs ?0?and csnt == ?? we is negated one quarter of a clock earlier and when acs <> ?0? and csnt == ?? we and cs are negated one quarter of a clock earlier. for more information refer to figures 15-6 and 15-8. the trlx field is provided for memory systems that require more relaxed timing between signals. when trlx is set and acs <> 00, an additional cycle between the address and strobes is inserted by the mpc801 memory controller. see figure 15-9 for more information. when trlx is set and csnt == ??in a write-memory access, the strobe lines (we and cs , if acs <> ?0? are negated one clock earlier than in the normal case. refer to figures 15-10 through 15-12 for details. when a bank is selected to operate with external transfer acknowledge (seta == ?? and trlx == ?? the memory controller does not support external devices providing ta to complete the transfer with zero wait states. the minimum access duration in this case is 3 clock cycles. clock address ts ta cs r/w data acs =?1
memory controller motorola mpc801 user? manual 15-11 15 figure 15-9. mpc801 gpcm?elaxed timing?ead access (acs = 10, acs = 11, scy = 1, trlx =1) figure 15-10. mpc801 gpcm?elaxed timing?rite access (acs = 10, acs = 11, scy = 0, csnt = 0, trlx =1) clock address ts ta cs r/w we data oe acs =?1 clock address ts ta cs r/w we data oe acs =?1
memory controller 15-12 mpc801 user? manual motorola 15 figure 15-11. mpc801 gpcm?elaxed timing?rite access (acs = 10, acs = 11, scy = 0, csnt = 1, trlx =1) figure 15-12. mpc801 gpcm?elaxed timing?rite access (acs = 00, scy = 0, csnt = 1, trlx =1 clock address ts ta cs r/w we data oe acs =?1 clock address ts ta cs r/w we data oe
memory controller motorola mpc801 user? manual 15-13 15 15.2.2.1 programmable wait state configuration . the general-purpose chip-select machine supports internal ta generation. it allows ?ast?accesses to external memory through an internal bus master and a maximum of 17 clock accesses. this can be done by programming the scy bits in the option register. the internal ta generation mode is enabled if the seta bit in the option register is negated. if the ta pin is externally asserted at least two clock cycles before the wait state counter has expired, the current memory cycle is terminated. when trlx is set, the number of wait states inserted by the memory controller is defined by numberofwaitstates = 2 x scy. 15.2.2.2 extended hold time on read accesses . slow memory devices that require a long delay on data read accesses should set the ehtr bit in the corresponding option register. any mpc801 access to the external bus following a read access to the slower memory bank is delayed by one clock cycle, unless it is a read access to the same bank. refer to figures 15-13 through 15-16 for details. figure 15-13. mpc801 consecutive accesses write after read?orx-ehtr = 0) clock address ts ta cs x csy r/w data oe tdt
memory controller 15-14 mpc801 user? manual motorola 15 figure 15-14. mpc801 consecutive accesses write after read?orx-ehtr = 1) figure 15-15. mpc801 consecutive accesses read after read from different banks?orx-ehtr = 1) clock address ts ta cs x csy r/w data oe tdt long tdt allowed clock address ts ta cs x csy r/w data oe tdt long tdt allowed
memory controller motorola mpc801 user? manual 15-15 15 figure 15-16. mpc801 consecutive accesses read after read from same bank?(orx-ehtr = 1) 15.2.2.3 global chip-select operation . global (boot) chip-select operation allows address decoding for a boot rom before system initialization occurs. the cs0 signal is the global chip-select output and its operation differs from the other external chip-select outputs on system reset. when the mpc801 internal core begins accessing memory at system reset, cs0 is asserted for every address, unless an internal register is accessed. the global chip-select provides a programmable port size during system reset by using the rstconf and d[0:31] pins. see section 4.3 how to configure reset for more information. setting these pins appropriately allows a boot rom to be located anywhere in the address space. the global chip-select does not provide write protection and responds to all address types. cs0 operates this way until the first write to the cs0 option register (or0) is made and it can be programmed to continue decoding a range of addresses once the preferred address range is loaded into base register 0. after the first write to or0, the global chip-select can only be restarted on system reset. the initial values of the ?oot bank? in the memory controller are described in table 15-1. clock address ts ta cs x csy r/w data oe tdt
memory controller 15-16 mpc801 user? manual motorola 15 15.2.2.4 sram interface . figure 15-17 illustrates a simple connection between an sram device and the mpc801. figure 15-17. mpc801?imple 128k sram configuration table 15-1. boot bank field values after reset field value ps from reset configuration pare 0 wp 0 ms[0:1] 00 v from reset configuration am[0:16] 0x0 atm[0:2] 0x0 csnt 1 acs[0:1] 11 bi 1 scy[0:3] 1111 seta 0 trlx 1 ehtr 0 32-bit wide sram mpc801 we [0:3] ce oe address data we [0:3] cs x gpl1 / oe a[15:29] d[0:31]
memory controller motorola mpc801 user? manual 15-17 15 15.2.2.5 gpcm external asynchronous master support . figure 15-18 illustrates the basic interface between an asynchronous external master and the mpc801 to allow connection to ?tatic ram?memory. figure 15-18. mpc801?synchronous external master configuration for gpcm?andled memory devices figure 15-19 illustrates the timing for trlx = 0 when an external asynchronous master accesses sram. the ta signal remains asserted with the we and oe signals until as is negated by the external master. memory mpc801 address ce oe w data address cs x oe we data asynchronous external master as ta ta as address data
memory controller 15-18 mpc801 user? manual motorola 15 figure 15-19. asynchronous master gpcm?emory devices basic timing (trlx = 0) when an external asynchronous master performs an access to a memory device via the general-purpose chip-select machine in the mpc801 memory controller, the csnt bit in the option register is configured as ?on? care? clock address cs we oe data ta as
memory controller motorola mpc801 user? manual 15-19 15 15.2.3 user-programmable machines the user-programmable machine (upm) is a flexible interface that connects to a wide range of memory devices. at the heart of the user-programmable machine is an internal memory ram that specifies what the logical value driven on the external memory controller pins are for a given clock cycle. each word in the ram provides bits that allow a memory access to be controlled with a resolution of one quarter the system clock period on byte- and chip- select lines. there are three possible ways to initiate a upm cycle: when an internal or external master requests an external memory access. when an internal periodic timer expires, thus requesting a transaction. when a valid command is written to the memory command register. figure 15-20 illustrates basic user-programmable machine operation. figure 15-20. general description of a upm when a new access to external memory is requested by any of the internal masters, the address of the transfer and the address type is compared to each one of the valid banks defined in the memory controller. when an address match is found in one of the memory banks, the ms bits of its base register selects the user-programmable machine that will handle the memory access. a service request from the selected user-programmable machine is required for this access. external signals timing generator internal signals latch array generator external memory access internal periodic timer software request ram array increment request request (last = 0) wait request logic waen hold pointer request wait pointer
memory controller 15-20 mpc801 user? manual motorola 15 when a request is initiated, the first location pointed to in the ram array can be one of the following fixed addresses that is determined by the requested cycle? attributes. read single beat start address (rssa) ram address = 0x?0 write single beat start address (wssa) ram address = 0x?8 read burst cycle start address (rbsa) ram address = 0x?8 write burst cycle start address (wbsa) ram address = 0x?0 each user-programmable machine has a machine mode register (mamr and mbmr) that defines the general attributes for operation. the pta bits of the mamr and the ptb bits of the mbmr define the period for the periodic timers associated with upma and upmb. if the ptae is asserted, the periodic timer of upma requests a transaction. if the ptbe is asserted, the periodic timer of upmb requests a transaction. when the periodic interrupt timer request is serviced, the first location pointed to in the ram array is fixed at ram address = 0x?0. figure 15-21 illustrates the hardware associated with the memory periodic timer request generation. in general, the periodic timer is used for refresh cycle operation. figure 15-21. memory periodic timer request block diagram the software can request a special service from the user-programmable machine by writing a valid command to the memory command register (mcr) and memory data register (mdr). the commands allow the ram to be read, written, or to start running a pattern in the ram from an arbitrary location. when a request is serviced, the ram is read each clock cycle from consecutive addresses until the last bit in a ram word is found. the words read from the ram provide information about the value and timing of the external signals controlled by the user-programmable machine and about specific strobes that control internal memory controller resources. when the waen bit in the ram word read is set, the external upwait signal is sampled and synchronized by the memory controller. if it is asserted, the logical value of the external signals are frozen to the value defined in the last ram word accessed and the ram address increment is disabled until the upwait signal is negated. this allows wait states to be inserted as required by an external device through an external signal. a memory disable timer (mdta or mdtb) is associated with each user-programmable machine. this timer counts down to zero starting at the value programmed in the dsa/dsb field of the mamr/mbmr. the one-shot timer trigger is controlled by the todt in the ram array. when an access to a memory bank controlled by upm x has the memory disable timer turned on, a new user-programmable machine access to this bank is held off until the timer expires. in general, the disable timer is a simple way to assure that a ras precharge is met. upma periodic timer request upmb periodic timer request brgclk divide by pta ptp prescaling divide by ptb
memory controller motorola mpc801 user? manual 15-21 15 each of the ram arrays can control the way in which the address of the current access is output to the a[0:31] external pins. the address multiplex field (ama[0:2] in the mamr and amb[0:2] in the mbmr) allows each of the user-programmable machines to select an address multiplexing configuration. the amx bits in the ram array controls the multiplexing/nonmultiplexing value of the address pins on a cycle-by-cycle basis. the amx bits can also control whether or not to output the memory address register (mar) contents to the external address pins. the ram word includes bits that specify the value of the various external signals at each clock edge. the external signal timing generator causes the external signals to behave according to the pattern specified in the current word. figures 15-22 and 15-23 illustrate the clock scheme of the user-programmable machines in the memory controller. table 20-1 shows the value of the external signals that can be changed if specified in the ram after any of the edges of gclk1 and gclk2 and a circuit delay time. figure 15-22. memory controller upm clock scheme (for system_to clkout division factor 1?bdf = 00) figure 15-23. memory controller upm clock scheme (for system_to clkout division factor 2?bdf = 01) clkout gclk1 gclk2 internal system clock clkout gclk1 gclk2 internal system clock
memory controller 15-22 mpc801 user? manual motorola 15 the cs signals are handled in a similar way, except that only the cs signal corresponding to the currently accessed bank is modified. the bs signal assertion and negation timing is also specified for each cycle in the ram, but the final value of each one of these signals depends on the port size of the specified bank, the external address accessed, and the value of the tsiz pins. figures 15-24 and 15-25 provide examples of how to control the timing of the cs x , gpl1 , and gpl2 pins. a word is read from the ram that specifies on every clock cycle the logical bits cst4, cst1, cst2, cst3, g1t4, g1t3, g2t4, and g2t3. these bits indicate what the electrical value will be for the corresponding output pins at the appropriate timing. figure 15-24. upm signals timing example (for system_to clkout division factor 1?bdf = 00) clkout gclk1 gclk2 cs x gpl1 gpl2 cst4 cst1 cst2 cst3 cst4 cst1 cst2 cst3 g1t4 g1t3 g1t4 g1t3 g2t4 g2t3 g2t4 g2t3 word 1 word 2 internal system clock
memory controller motorola mpc801 user? manual 15-23 15 figure 15-25. upm signals timing example (for system_to clkout division factor 2?bdf = 01) the ram array size for each user-programmable machine is 64 locations deep and 32 bits wide as illustrated in figure 15-26. clkout gclk1 gclk2 cs x gpl1 gpl2 cst4 * cst2 cst3 cst4 * cst2 cst3 g1t4 g1t3 g1t4 g1t3 g2t4 g2t3 g2t4 g2t3 word 1 word 2 internal system clock * cst1
memory controller 15-24 mpc801 user? manual motorola 15 figure 15-26. upm external signal generation gclk1 gclk2 gpl0 gpl2 gpl3 gpl4 gpl5 external signals timing generator ram array cs line selector byte select packaging cs [0:7] bs [0:3] current bank tsiz, ps, a[30:31] 32 bits 64 gpl1 bits
memory controller motorola mpc801 user? manual 15-25 15 15.2.3.1 ram word structure and timing specification the ram word structure is illustrated in figure 15-27 and described in table 15-2. with typical dram, the cs signals correspond to ras and the bs signals correspond to cas . likewise, the gpl signals can be used as output enables. figure 15-27. ram word structure bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 cst4 cst1 cst2 cst3 bst4 bst1 bst2 bst3 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 g0l0 g0l1 g0h0 g0h1 g1t4 g1t3 g2t4 g2t3 bit 16 bit 17 bit 18 bit 19 bit 20 bit 21 bit 22 bit 23 g3t4 g3t3 g4t4/dlt3 g4t3/waen g5t4 g5t3 reserved reserved bit 24 bit 25 bit 26 bit 27 bit 28 bit 29 bit 30 bit 31 loop exen amx0 amx1 na uta todt last table 15-2. upm ram word bits mnemonic function 0 cst4 cst4 = 0 means the value of the cs signal at the trailing edge of gclk2 will be ? cst4 = 1 means the value of the cs signal at the trailing edge of gclk2 will be ? 1 cst1 cst1 = 0 means the value of the cs signal at the rising edge of gclk1 will be ? cst1 = 1 means the value of the cs signal at the rising edge of gclk1 will be ? 2 cst2 cst2 = 0 means the value of the cs signal at the rising edge of gclk2 will be ? cst2 = 1 means the value of the cs signal at the rising edge of gclk2 will be ? 3 cst3 cst3 = 0 means the value of the cs signal at the trailing edge of gclk1 will be ? cst3 = 1 means the value of the cs signal at the trailing edge of gclk1 will be ? 4 bst4 bst4 = 0 means the value of the bs signals at the trailing edge of gclk2 will be ? bst4 = 1 means the value of the bs signals at the trailing edge of gclk2 will be ? note: the final value of the bs signals depends on the value of the ps bits in the br accessed, the value of the tsiz signals for the access, and the value of the a[30:31] signals. for more information about the bs signals, see section 15.2.3.1 ram word structure and timing specification .
memory controller 15-26 mpc801 user? manual motorola 15 5 bst1 bst1 = 0 means the value of the bs signals at the rising edge of gclk1 will be ? bst1 = 1 means the value of the bs signals at the rising edge of gclk1 will be ? note: the final value of the bs signals depends on the value of the ps bits in the br accessed, the value of the tsiz signals for the access and the value of the a[30:31] signals. 6 bst2 bst2 = 0 means the value of the bs signals at the rising edge of gclk2 will be ? bst2 = 1 means the value of the bs signals at the rising edge of gclk2 will be ? note: the final value of the bs signals depends on the value of the ps bits in the br accessed, the value of the tsiz signals for the access, and the value of the a[30:31] signals. 7 bst3 bst3 = 0 means the value of the bs signals at the trailing edge of gclk1 will be ? bst3 = 1 means the value of the bs signals at the trailing edge of gclk1 will be ? note: the final value of the bs signals depends on the value of the ps bits in the br accessed, the value of the tsiz signals for the access, and the value of the a[30:31] signals. 8-9 g0l(0:1) g0l = 10 means the value of the gpl0 signal at the trailing edge of gclk2 will be ? g0l = 11 means the value of the gpl0 signal at the trailing edge of gclk2 will be ? g0l = 00 means the value of the gpl0 signal at the trailing edge of gclk2 will be as defined in the g0cl field in the mxmr 10-11 g0h(0:1) g0h = 10 means the value of the gpl0 signal at the trailing edge of gclk1 will be ? g0h = 11 means the value of the gpl0 signal at the trailing edge of gclk1 will be ? g0h = 00 means the value of the gpl0 signal at the trailing edge of gclk1 will be as defined in the g0cl field in the mxmr 12 g1t4 g1t4 = 0 means the value of the gpl1 signal at the trailing edge of gclk2 will be ? g1t4 = 1 means the value of the gpl1 signal at the trailing edge of gclk2 will be ? 13 g1t3 g1t3 = 0 means the value of the gpl1 signal at the trailing edge of gclk1 will be ? g1t3 = 1 means the value of the gpl1 signal at the trailing edge of gclk1 will be ? 14 g2t4 g2t4 = 0 means the value of the gpl2 signal at the trailing edge of gclk2 will be ? g2t4 = 1 means the value of the gpl2 signal at the trailing edge of gclk2 will be ? 15 g2t3 g2t3 = 0 means the value of the gpl2 signal at the trailing edge of gclk1 will be ? g2t3 = 1 means the value of the gpl2 signal at the trailing edge of gclk1 will be ? 16 g3t4 g3t4 = 0 means the value of the gpl3 signal at the trailing edge of gclk2 will be ? g3t4 = 1 means the value of the gpl3 signal at the trailing edge of gclk2 will be ? 17 g3t3 g3t3 = 0 means the value of the gpl3 signal at the trailing edge of gclk1 will be ? g3t3 = 1 means the value of the gpl3 signal at the trailing edge of gclk1 will be ? 18 g4t4/dlt3 when gpl4_xdis = 0 in the corresponding mxmr: g4t4/dlt3 = 0 means the value of the gpl4 signal at the trailing edge of gclk2 will be ? g4t4/dlt3 = 1 means the value of the gpl4 signal at the trailing edge of gclk2 will be ? when gpl4_xdis = 1 in the corresponding mxmr: g4t4/dlt3 = 1 in the current word, indicates that the data bus should be sampled at the falling edge of gclk2 (if a read burst or a single read service is executed). g4t4/dlt3 = 0 in the current word, indicates that the data bus should be sampled at the rising edge of gclk2 (if a read burst or a single read service is executed). table 15-2. upm ram word (continued) bits mnemonic function
memory controller motorola mpc801 user? manual 15-27 15 19 g4t3/waen when gpl4_xdis = 0 in the corresponding mxmr: g4t3/waen = 0 means the value of the gpl4 signal at the trailing edge of gclk1 will be ? g4t3/waen = 1 means the value of the gpl4 signal at the trailing edge of gclk1 will be ? when gpl4_xdis = 1 in the corresponding mxmr: g4t3/waen = 1 in the current word indicates that a ?reeze?in the external signals logical value will occur if the external wait signal is asserted. this condition lasts until the wait signal is negated. 20 g5t4 g5t4 = 0 means the value of the gpl5 signal at the trailing edge of gclk2 will be ? g5t4 = 1 means the value of the gpl5 signal at the trailing edge of gclk2 will be ? 21 g5t3 g5t3 = 0 means the value of the gpl5 signal at the trailing edge of gclk1 will be ? g5t3 = 1 means the value of the gpl5 signal at the trailing edge of gclk1 will be ? 22-23 reserved 24 loop loop = 1 indicates that the current word is the start or end of a loop subpattern. the first word in a pattern where the loop bit is ??is marked as the loop start word. the next word in the same pattern where the loop bit is ??is marked as the loop end word. the user- programmable machine runs the subpattern between the loop start word and loop end word many times as defined in the corresponding loop field of the mxmr. 25 exen exen = 1 in the current word indicates that a ?ranch?to the exception pattern is enabled after the current cycle if an exception condition is detected. the exception condition can be an external device asserting tea or an external reset request. 26-27 amx(0:1) amx = 00 means the value of the a[0:31] signals at the trailing edge of gclk1 will be the address requested by the internal master for the external access. ex: column address. amx = 10 means the value of the a[0:31] signals at the trailing edge of gclk1 will be the address requested by the internal master for the external access multiplexed according to the one specified in the ama/amb bits of the mamr/mbmr. ex: row address. amx = 11 means the value of the a[0:31] signals at the trailing edge of gclk1 will be the contents of the mar. ex: sdram mode initialization. 28 na na = 1 if the port size of the accessed bank is 32 bits, the value of the address lines a[28:31] at the trailing edge of gclk1 will be incremented by 4. na = 1 if the port size of the accessed bank is 16 bits, the value of the a[28:31] signals at the trailing edge of gclk1 will be incremented by 2. na = 1 if the port size of the accessed bank is 8 bits, the value of the a[28:31] signals at the trailing edge of gclk1 will be incremented by 1. na = 0 means the address increment is disabled. note: the value of the na bit is relevant only when the upm serves a burst-read or burst-write request. under other patterns this bit is reserved. 29 uta this line indicates the value of the ta signal sampled by the system interface unit in the current cycle. the ta signal is output at the rising edge of gclk2. 30 todt todt = 1 if the disable timer for the current accessed bank is turned on. this avoids a new access to the same bank (when controlled by any of the user-programmable machines) until the disable timer is expired. ex: precharge time. 31 last last = 1 means the service to the upm request is done table 15-2. upm ram word (continued) bits mnemonic function
memory controller 15-28 mpc801 user? manual motorola 15 15.2.3.2 cs signals. if the ms bits in the br x of the accessed memory bank selects the user-programmable machine on the currently requested cycle, the user-programmable machine can only affect the electrical value of the cs x signal and the timing of the change is specified in the upm internal ram. figure 15-28 illustrates how the cs signals are controlled by the user-programmable machines. figure 15-28. cs signal control model upma upmb gpcm mux switch bank selected ms[0:1] cs0 cs1 cs2 cs3 cs4 cs5 cs6 cs7 ms[0:1] 00 01 10 11 cs gpcm umpa umpb x
memory controller motorola mpc801 user? manual 15-29 15 15.2.3.3 byte select signals. if the ms bits in the br x of the memory bank being accessed selects the upma or upmb to handle the current cycle, the upma or upmb only determines the timing and value of the bs signals if it is allowed by the port size of the accessed bank, the transfer size of the transaction, and the address accessed. figure 15-29 illustrates how the bs signals are controlled by the user-programmable machines. figure 15-29. byte select control model the upper-upper byte select (bs0 ) indicates that the upper eight bits of the data bus (d[0:7]) contain valid data during a cycle and the upper-middle write enable (bs1 ) indicates that the upper-middle eight bits of the data bus (d[8:15]) contain valid data during a cycle. the lower-middle write enable (bs2 ) indicates that the lower-middle eight bits of the data bus (d[16:23]) contain valid data during a cycle and the lower-lower write enable (bs3 ) indicates that the lower eight bits of the data bus contain valid data during a cycle. the manner in which the bs signals are affected in a transaction for a 32-, 16-, or 8-bit port is shown in table 15-3. it should be noted that for a periodic timer request and a memory command request, the bs signals are only determined by the port size of the bank. upma upmb mux bank selected ms ps tsiz a[30:31] bs0 bs1 bs2 bs3 logic byte select
memory controller 15-30 mpc801 user? manual motorola 15 . 15.2.3.4 general-purpose signals. the user-programmable machine controls each of the gpl signals using two bits in the upm word. the two bits define the logical value of the signal to be changed at the falling edge of gclk2 and/or gclk1. gpl5 and gpl0 offer the following enhancements beyond the other gpl x signals: the logical value gpl5 can be controlled at the falling edge of gclk1 in the first clock cycle of a write or read memory access, according to the value of gl5s in the corresponding option register. the gpl0 signal can output the value of an address signal as specified in the corresponding m x mr that is controlled by the user-programmable machine. this is helpful when there needs to be some control of the value output to the address signals that connect to some types of memory devices. table 15-3. byte select enable function transfer size tsiz address 32-bit port size 16-bit port size 8-bit port size a[30] a[31] bs0 bs1 bs2 bs3 bs0 bs1 bs2 bs3 bs0 bs1 bs2 bs3 byte 0 1 0 0 x x x 01 0 1 x x x 01 1 0 x x x 01 1 1 x x x half-word 1 0 0 0 x x x x x 101 0 xxxx x word 0 0 0 0 xxxxxx x clkout gclk1 ts word 1 word 2 gpl5 value controlled by g5ls value controlled by g5t4 and g5t3 on upm
memory controller motorola mpc801 user? manual 15-31 15 15.2.3.5 loop control signal. the loop bit in the user-programmable machine allows you to run repetitive subpatterns included in a memory cycle pattern a specific number of times. the memory controller marks the first word that the loop bit is found asserted in a pattern as the loop start word. at this time, the memory loop counter is loaded with the corresponding contents of the loop field. the next word that the loop bit is found asserted in the same pattern is marked as the loop end word in the memory controller. at this time, the memory loop counter is decremented by one. whether or not the word following the loop end word is run depends on the value of the memory loop counter. if it is not zero, the next word is the loop start word. if it is zero, the user-programmable machine continues with the word after loop end word. after exiting a loop, the next word read in the user-programmable machine with a loop bit set, is marked as the new loop start word of the new loop. every time the last bit is found in a pattern, the loop condition is reset. the loop field is loaded into the loop counter when the user-programmable machine services a request. the decoding of the loop bits is shown in table 15-4. 15.2.3.6 exception handling. when an access to a memory device is initiated by the mpc801 under upm control on the memory controller, the external device may assert the tea or reset signal. the mpc801 tries to close the bus transfer immediately. the user-programmable machine in the memory controller provides a mechanism by which you can handle the memory control signals to meet the timing requirements of the device and assume no data is lost. when one of the exceptions mentioned above is recognized and the exen bit in the user-programmable machine is set to 1, the next word read and run by the user-programmable machine is found at the fixed address ?xception start addressexsa (ram address = 0x?c). normally, there is a pattern here that allows immediate negation of the control signals. if the exen bit is 0, the user-programmable machine continues with the remaining words until the exen bit is 1 and a branch to the exception start address is performed or until the last bit is read by the user-programmable machine. when the ?ranch?to the exsa is performed, the user-programmable machine continues reading from successive locations until the last bit is equal to 1 in a upm word. table 15-4. loop field for upm service requests request serviced upm loop field loaded read single beat cycle rlfx read burst cycle rlfx write single beat cycle wlfx write burst cycle wlfx periodic timer expired tlfx
memory controller 15-32 mpc801 user? manual motorola 15 15.2.3.7 address control signals. you can control the address signals with the pattern written into the user-programmable machine. the ama and amb bits choose between outputting an address requested by the internal master or outputting it according to the multiplexing specified by the ama and amb bits in the machine mode register. see table 15-5 for details. the last option is to output the contents of the mar on the address pins. the address for the first clock cycle of a read or write memory access is generated according to the value of the sam bit in the corresponding option register. table 15-6 shows how the ama and amb bits can be defined to interface with a wide range of dram modules. table 15-5. address multiplexing ama/ amb a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 000 res res a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 001 res a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 010 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 011 res a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 100 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 101 res a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 clkout gclk1 ts word 1 word 2 a[0:31] address controlled by sam address controlled by amx
memory controller motorola mpc801 user? manual 15-33 15 table 15-6. ama/amb definition for dram interfaces width size (k) number of row address lines number of column address lines address connection ama/amb 8 bits 64k 8 8 a24 - a31 000 128k 9 a23 - a31 256k 10 a22 - a31 512k 11 a21 - a31 1m 12 a20 - a31 2m 13 a19 - a31 4m 14 a18 - a31 256k 9 9 a23 - a31 001 512k 10 a22 - a31 1m 11 a21 - a31 2m 12 a20 - a31 4m 13 a19 - a31 8m 14 a18 - a31 16m 15 a17 - a31 1m 10 10 a22 - a31 010 2m 11 a21 - a31 4m 12 a20 - a31 8m 13 a19 - a31 16m 14 a18 - a31 32m 15 a17 - a31 64m 16 a16 - a31 4m 11 11 a21 - a31 011 8m 12 a20 - a31 16m 13 a19 - a31 32m 14 a18 - a31 64m 15 a17 - a31 16m 12 12 a20 - a31 100 32m 13 a19 - a31 64m 14 a18 - a31 128m 15 a17 - a31 256m 16 a16 - a31
memory controller 15-34 mpc801 user? manual motorola 15 8 bits 64m 13 13 a19 - a31 101 128m 14 a18 - a31 256m 15 a17 - a31 16 bits 128k 8 8 a23 - a30 000 256k 9 a22 - a30 512k 10 a21 - a30 1m 11 a20 - a30 2m 12 a19 - a30 4m 13 a18 - a30 512k 9 9 a22 - a30 001 1m 10 a21 - a30 2m 11 a20 - a30 4m 12 a19 - a30 8m 13 a18 - a30 16m 14 a17 - a30 2m 10 10 a21 - a30 010 4m 11 a20 - a30 8m 12 a19 - a30 16m 13 a18 - a30 32m 14 a17 - a30 64m 15 a16 - a30 8m 11 11 a20 - a30 011 16m 12 a19 - a30 32m 13 a18 - a30 64m 14 a17 - a30 32m 12 12 a19 - a30 100 64m 13 a18 - a30 128m 14 a17 - a30 256m 15 a16 - a30 128m 13 13 a18 - a30 101 256m 13 a17 - a30 table 15-6. ama/amb definition for dram interfaces (continued) width size (k) number of row address lines number of column address lines address connection ama/amb
memory controller motorola mpc801 user? manual 15-35 15 15.2.3.8 the disable timer mechanism. the disable timer associated with each user-programmable machine allows you to guarantee a minimum time during which two successive accesses to the same memory bank can be disabled. this feature is critical in the case of dram that requires a ras precharge time. the timer is turned on by the todt bit in the ram array and prevents upm access to the same bank until the timer expires. notice that if a different memory bank requests service from the user-programmable machine, it is accommodated. to avoid conflicts between different banks accessing the same user-programmable machine, it is recommended that each pattern on the user-programmable machine be equal to or greater than the defined disable timer period. 32 bits 256k 8 8 a22 - a29 000 512k 9 a21 - a29 1m 10 a20 - a29 2m 11 a19 - a29 4m 12 a18 - a29 1m 9 9 a21 - a29 001 2m 10 a20 - a29 4m 11 a19 - a29 8m 12 a18 - a29 16m 13 a17 - a29 4m 10 10 a20 - a29 010 8m 11 a19 - a29 16m 12 a18 - a29 32m 13 a17 - a29 64m 14 a16 - a29 16m 11 11 a19 - a29 011 32m 12 a18 - a29 64m 13 a17 - a29 64m 12 12 a18 - a29 100 128m 13 a17 - a29 256m 14 a16 - a29 256m 13 13 a17 - a29 101 table 15-6. ama/amb definition for dram interfaces (continued) width size (k) number of row address lines number of column address lines address connection ama/amb
memory controller 15-36 mpc801 user? manual motorola 15 15.2.3.9 transfer acknowledge and data sample control. during upm memory access, the value of the ta signal driven by the memory controller and sampled by the external bus interface is indicated in the uta bit of the user-programmable machine ram word. the ta signal is driven at the rising edge of the gclk2 signal. when a read access is handled by the user-programmable machine and the uta bit is ?? the value of the dlt3 bit in the same ram word indicates when the data input is sampled by the mpc801. figure 15-30 illustrates a schematic description of the hardware controlled by the user-programmable machine. figure 15-30. upm data handling in read accesses 15.2.3.10 the wait mechanism. the memory controller provides two mechanisms that it uses to interface with slave devices that are either slow or cannot guarantee a predefined access time?he wait and the external ta. these devices can be divided into two main types: variable access time devices slow devices the wait mechanism is only used in accesses that are controlled by the user-programmable machine. the gpla4dis bit of the mamr and the gplb4dis bit of the mbmr enable this mechanism. the external ta mechanism is only used in accesses that are controlled by the gpcm. the seta bit in the option register specifies whether the ta is generated internally or externally. to internal data bus gclk2 upmx selected to handle the transfer and (gpl4xdis = 1) and rd/wr and dlt3x data bus m u l t i p l e x e r
memory controller motorola mpc801 user? manual 15-37 15 15.2.3.10.1 variable access time solution. assume that the core initiates a read cycle on the local bus that addresses the main storage connected to the system bus. the hierarchical bus interface accepts the local bus request and generates a read cycle on the system bus. the programmer cannot foresee when the data will be valid to be latched by the core since the system bus can be occupied by the dma. there are two possible solutions: the external module signals to the memory controller that the data is not ready yet by asserting the upwait signal. the memory controller synchronizes the signal since the wait signal is asynchronous. when the wait signal is asserted, the user-programmable machine enters freeze mode at the falling edge of the clockout when the waen bit is set in the upm word. the user-programmable machine remains in this state as long as the upwait signal is asserted. after upwait is negated, the user-programmable machine will continue executing from the next entry to the end of the pattern and the last bit is set. the bus interface module signals to the memory controller when it can sample the data by asserting the synchronous ta signal. 15.2.3.10.2 slow device solution. assume that the core initiates a read cycle from slow devices whose access time is greater than the maximum allowed by the user-programmable machine. there are two possible solutions: the core generates a read access from the slow device. the device will react by asserting a wait signal as long as the data is not ready. the core will sample the data only after the wait signal is negated. the core generates a read access from the slow device, which is responsible for generating the synchronous tz when the data is ready. 15.2.3.10.3 internal and external synchronous master. figure 15-31 illustrates how the waen bit in the word is read by the user-programmable machine and the upwait signal is used to hold the user-programmable machine in a particular state until the upwait signal is negated. the upwait signal is sampled at the falling edge of the clkout. if the signal is asserted and the waen bit in the current user-programmable machine is enabled word, the user- programmable machine is frozen until the upwait signal is negated. the value of the external pins driven by the user-programmable machine remains as indicated in the word previously read by the user-programmable machine. when the upwait signal is negated, the user-programmable machine continues with its normal functions. during the wait cycles, the ta signal is negated by the user-programmable machine.
memory controller 15-38 mpc801 user? manual motorola 15 figure 15-31. upm wait mechanism timing for internal and external synchronous masters 15.2.3.10.4 external asynchronous master. when the user-programmable machine is activated to support an asynchronous external master, the wait mechanism operates in a way that allows the as signal to behave as the external wait signal. the user-programmable machine enters a wait state if, after synchronizing it, the as signal is asserted and the waen bit in the current upm word is enabled. in an analogous way to the behavior explained above, the value of the external pins driven by the user-programmable machine remains as indicated in the previous word read by the user-programmable machine. to exit the wait state, the as signal should be negated, thus causing all external signals controlled that are by the user-programmable machine to be driven high a circuit delay after the negation. the external signals are driven in this state until the last bit is found in a upm word. the ta signal that is driven by the user-programmable machine remains in its previous value until the as signal is negated. the todt bit is relevant in the words read by the user-programmable machine after as is negated. refer to section 15.3 external master support for more information. when the last bit is read in a word of the user-programmable machine ram array, the highest priority pending request (if any) is serviced without a ?ap cycle?in the external memory transactions dependent on the disable timer values. clkout gclk1 gclk2 cs x gpl1 waen word n word n+1 a c1 c2 c3 c4 c5 c6 c7 c8 upwait b c d e f c9 c10 c11 c12 c13 c14 g word n+2 wait wait word n+3 ta
memory controller motorola mpc801 user? manual 15-39 15 figure 15-32. upm wait mechanism timing for an external asynchronous master 15.2.3.11 location of upm start addresses. table 15-7 provides the starting addresses of the user-programmable machine ram words for each transaction type. 15.2.3.12 example dram interface. connecting the mpc801 to a dram device requires a detailed examination of the timing diagrams that represent the possible memory cycles the mpc801 must perform to access the device. table 15-7. upm start address locations transaction type upm start address read single beat cycle 0x?0 read burst cycle 0x?8 write single beat cycle 0x?8 write burst cycle 0x?0 periodic timer expired 0x?0 exception 0x?c clkout gclk1 gclk2 cs x gpl1 waen word n word n+1 a c1 c2 c3 c4 c5 c6 c7 c8 as b c d e f c9 c10 c11 c12 word n+2 wait wait word n+3 ta ta1 ta2 c12 ta3
memory controller 15-40 mpc801 user? manual motorola 15 figure 15-33. mpc801?ram interface connection after the timing diagrams are created, the programming process translates the timings into tables that represent the ram array contents for each possible cycle. when the tables are completed, the global parameters of the user-programmable machine must be defined for handling the disable timer (precharge) and periodic timer (refresh) relative to figure 15-33. the following table shows the different field contents. table 15-8. upm ram word bit field example field value ms 10 ps 00 wp 0 pta x?c ptae 1 ama 001 dsa 01 wa/gpla 0 sam 1 bi 0 ras cas w mcm84256 256k x 8 8 a[0:8] d[0:7] ras cas w mcm84256 256k x 8 8 a[0:8] d[0:7] mpc801 bs[0:3] cs1 r/w a[21:29] d[0:31] ras cas w mcm84256 256k x 8 8 a[0:8] d[0:7] ras cas w mcm84256 256k x 8 8 a[0:8] d[0:7]
memory controller motorola mpc801 user? manual 15-41 15 the ram array of the user-programmable machine can be written with the mcr. the option and base registers of the specific bank must be initialized according to the address mapping of the dram device being used. the ms field should indicate the user-programmable machine selected to handle the cycle. figure 15-34 illustrates the first locations addressed by the user-programmable machine, according to the different services required by dram. figure 15-34. address start pointers of the upm ram array in figures 15-35 through 15-41, the table portion at the bottom of each figure represents the ram array contents that handle each of the possible cycles. each column represents a different word in the ram array. the sam bit in the option register determines address multiplexing for the first clock cycle and subsequent cycles are controlled by the user-programmable machine ram words. also notice that the amx bits in the user-programmable machine ram word control the address multiplexing for the following clock cycles rather than the current cycle. 64 rss wss rbs wbs pts burst read request burst write request read single beat request write single beat request periodic timer request exs exception condition
memory controller 15-42 mpc801 user? manual motorola 15 figure 15-35. single beat read access to page mode dram cst4 0 0 0 bit 0 cst1 0 0 0 bit 1 cst2 0 0 1 bit 2 cst3 0 0 1 bit 3 bst4 1 1 0 bit 4 bst1 1 0 0 bit 5 bst2 1 0 1 bit 6 bst3 1 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 0 0 1 bit 26 amx1 0 0 0 bit 27 na 000 bit 28 uta 1 0 1 bit 29 todt 0 0 1 bit 30 last 0 0 1 bit 31 rss rss+1 rss+2 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras )
memory controller motorola mpc801 user? manual 15-43 15 figure 15-36. single beat write access to page mode dram cst4 0 0 0 bit 0 cst1 0 0 0 bit 1 cst2 0 0 1 bit 2 cst3 0 0 1 bit 3 bst4 1 1 0 bit 4 bst1 1 0 0 bit 5 bst2 1 0 1 bit 6 bst3 1 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 0 0 1 bit 26 amx1 0 0 0 bit 27 na 000 bit 28 uta 1 0 1 bit 29 todt 0 0 1 bit 30 last 0 0 1 bit 31 wss wss+1 wss+2 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras )
memory controller 15-44 mpc801 user? manual motorola 15 figure 15-37. burst read access to page mode dram (no loop) cst4 000000000 bit 0 cst1 000000000 bit 1 cst2 000000001 bit 2 cst3 000000001 bit 3 bst4 110101010 bit 4 bst1 100000000 bit 5 bst2 101010101 bit 6 bst3 101010101 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 000000000 bit 24 exen 001010100 bit 25 amx0 000000001 bit 26 amx1 000000000 bit 27 na 001010100 bit 28 uta 101010101 bit 29 todt 000000001 bit 30 last 000000001 bit 31 rbs rbs+1 rbs+2 rbs+3 rbs+4 rbs+5 rbs+6 rbs+7 rbs+8 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row column 1 column 2 column 3 column 4 (cas [0:3]) (ras )
memory controller motorola mpc801 user? manual 15-45 15 figure 15-38. burst read access to page mode dram (loop) cst4 00000 bit 0 cst1 00000 bit 1 cst2 00001 bit 2 cst3 00001 bit 3 bst4 11010 bit 4 bst1 10000 bit 5 bst2 10101 bit 6 bst3 10101 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 01100 bit 24 exen 00100 bit 25 amx0 00001 bit 26 amx1 00000 bit 27 na 00100 bit 28 uta 10101 bit 29 todt 00001 bit 30 last 00001 bit 31 rbs rbs+1 rbs+2 rbs+3 rbs+4 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row column 1 column 2 column 3 column 4 (cas [0:3]) (ras )
memory controller 15-46 mpc801 user? manual motorola 15 figure 15-39. burst write access to page mode dram (no loop) cst4 000000000 bit 0 cst1 000000000 bit 1 cst2 000000001 bit 2 cst3 000000001 bit 3 bst4 110101010 bit 4 bst1 100000000 bit 5 bst2 101010101 bit 6 bst3 101010101 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 000000000 bit 24 exen 001010100 bit 25 amx0 000000001 bit 26 amx1 000000000 bit 27 na 001010100 bit 28 uta 101010101 bit 29 todt 000000001 bit 30 last 000000001 bit 31 wbs wbs+1 wbs+2 wbs+3 wbs+4 wbs+5 wbs+6 wbs+7 wbs+8 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row column 1 column 2 column 3 column 4 (ras ) (cas [0:3])
memory controller motorola mpc801 user? manual 15-47 15 figure 15-40. refresh cycle (cbr) to page mode dram cst4 1 0 0 bit 0 cst1 1 0 0 bit 1 cst2 1 0 1 bit 2 cst3 1 0 1 bit 3 bst4 1 0 0 bit 4 bst1 0 0 0 bit 5 bst2 0 0 1 bit 6 bst3 0 0 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0 0 0 bit 24 exen 0 0 0 bit 25 amx0 0 0 1 bit 26 amx1 0 0 0 bit 27 na 000 bit 28 uta 0 0 0 bit 29 todt 0 0 1 bit 30 last 0 0 1 bit 31 pts pts+1 pts+2 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras )
memory controller 15-48 mpc801 user? manual motorola 15 figure 15-41. exception cycle cst4 1 bit 0 cst1 1 bit 1 cst2 1 bit 2 cst3 1 bit 3 bst4 1 bit 4 bst1 1 bit 5 bst2 1 bit 6 bst3 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0 bit 24 exen 0 bit 25 amx0 0 bit 26 amx1 0 bit 27 na 0 bit 28 uta 0 bit 29 todt 1 bit 30 last 1 bit 31 exs clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras )
memory controller motorola mpc801 user? manual 15-49 15 if the gpla4 signal is not used as an output line, the performance for a page read access can be increased significantly if the gpl_x4dis is defined as ?? the data bus is sampled at the falling edge of gclk1 if instructed by the upm word. the following table shows an example of how the burst read access to page mode dram (no loop) can be modified. the configuration registers are defined in the following way. the timing diagram in figure 15-42 illustrates how the nine cycles of the burst read access shown in figure 15-37 can be reduced to 6 clock cycles (for 32-bit port size memory). when a 16-bit port size memory is connected, the reduction is from 17 to 10 cycles and when an 8-bit port size memory is connected, the reduction is from 33 to 18 cycles. table 15-9. upm ram word bit field example field value ms 10 ps 00 wp 0 pta x?c ptae 1 ama 001 dsa 01 gpl_a4dis 1 sam 1 bi 0
memory controller 15-50 mpc801 user? manual motorola 15 figure 15-42. page mode dram burst read access (data sampling on falling edge of clkout) cst4 000001 bit 0 cst1 000001 bit 1 cst2 000001 bit 2 cst3 000001 bit 3 bst4 111111 bit 4 bst1 100001 bit 5 bst2 100001 bit 6 bst3 100001 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 -> dlt3 111111 bit 18 g4t3 000000 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 000000 bit 24 exen 000000 bit 25 amx0 000011 bit 26 amx1 000000 bit 27 na 011100 bit 28 uta 101001 bit 29 todt 000001 bit 30 last 000001 bit 31 rbs rbs+1 rbs+2 rbs+3 rbs+4 rbs+5 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] row col 1 (cas [0:3]) (ras ) col 2 col 3 col 4 d1 d2 d3 d4
memory controller motorola mpc801 user? manual 15-51 15 15.2.3.13 extended data-out interface example figure 15-43 illustrates a memory connection to extended data-out (edo) types of devices. for this connection, gpl1 is connected to the memory device oe pins. figure 15-43. edo interface connection table 15-10 shows the register field programming that supports the configuration illustrated in figure 15-43. the assumption is that the brgclk frequency is 25mhz and that the device needs a 512-cycle refresh every 8 milliseconds. the example assumes a clkout frequency of 50mhz. table 15-10. edo connection field value example field value ms 10 ps 00 wp 0 ptp x?2 pta x?c ptae 1 ama 001 dsa 10 sam 1 bi 0 ras casl ,cash we mt4c16270 256k x 16 16 a[0:8] d[0:7] mpc801 bs [0:3] cs1 r/w a[21:29] d[0:31] gpl1 oe 2 2 16 ras casl ,cash we mt4c16270 256k x 16 a[0:8] d[0:7] oe
memory controller 15-52 mpc801 user? manual motorola 15 figure 15-44. single beat read access to page mode dram with extended data-out cst4 00000 bit 0 cst1 00000 bit 1 cst2 00001 bit 2 cst3 00001 bit 3 bst4 11000 bit 4 bst1 10000 bit 5 bst2 10001 bit 6 bst3 10001 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 00000 bit 12 g1t3 00001 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 00000 bit 24 exen 00000 bit 25 amx0 00001 bit 26 amx1 00000 bit 27 na 00000 bit 28 uta 11101 bit 29 todt 00001 bit 30 last 00001 bit 31 rss rss+1 rss+2 rss+3 rss+4 clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras ) gpl1 (oe )
memory controller motorola mpc801 user? manual 15-53 15 figure 15-45. single beat write access to page mode dram with extended data-out cst4 0001 bit 0 cst1 0001 bit 1 cst2 0011 bit 2 cst3 0011 bit 3 bst4 1100 bit 4 bst1 1000 bit 5 bst2 1000 bit 6 bst3 1001 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 1111 bit 12 g1t3 1111 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0000 bit 24 exen 0000 bit 25 amx0 0001 bit 26 amx1 0000 bit 27 na 0000 bit 28 uta 1101 bit 29 todt 0001 bit 30 last 0001 bit 31 wss wss+1 wss+2 wss+3 clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras ) gpl1 (oe )
memory controller 15-54 mpc801 user? manual motorola 15 figure 15-46. burst read access to page mode dram with extended data-out cst4 00000000000 bit 0 cst1 00000000000 bit 1 cst2 00000000001 bit 2 cst3 00000000001 bit 3 bst4 11011010101 bit 4 bst1 10011010101 bit 5 bst2 10010101011 bit 6 bst3 10010101011 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 00000000000 bit 12 g1t3 00000000001 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 00000000000 bit 24 exen 00010101000 bit 25 amx0 00000000001 bit 26 amx1 00000000000 bit 27 na 00100101000 bit 28 uta 11101010101 bit 29 todt 00000000001 bit 30 last 00000000001 bit 31 rbs rbs+1 rbs+2 rbs+3 rbs+4 rbs+5 rbs+6 rbs+7 rbs+8 rbs+9 rbs+10 clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras ) gpl1 (oe ) column 2 column 3 column 4
memory controller motorola mpc801 user? manual 15-55 15 figure 15-47. burst write access to page mode dram with extended data-out cst4 0000000000 bit 0 cst1 0000000000 bit 1 cst2 0000000001 bit 2 cst3 0000000001 bit 3 bst4 1100000101 bit 4 bst1 1000010101 bit 5 bst2 1001010101 bit 6 bst3 1001010101 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 1111111111 bit 12 g1t3 1111111111 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0000000000 bit 24 exen 0001010100 bit 25 amx0 0000000001 bit 26 amx1 0000000000 bit 27 na 0001010100 bit 28 uta 1011010101 bit 29 todt 0000000001 bit 30 last 0000000001 bit 31 wbs wbs+1 wbs+2 wbs+3 wbs+4 wbs+5 wbs+6 wbs+7 wbs+8 wbs+9 clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] row column 1 (cas [0:3]) (ras ) gpl1 (oe ) column 2 column 3 column 4
memory controller 15-56 mpc801 user? manual motorola 15 figure 15-48. refresh cycle (cbr) to page mode dram with extended data-out cst4 10001 bit 0 cst1 10001 bit 1 cst2 00001 bit 2 cst3 00001 bit 3 bst4 00111 bit 4 bst1 01111 bit 5 bst2 01111 bit 6 bst3 01111 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 11111 bit 12 g1t3 11111 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 00000 bit 24 exen 00000 bit 25 amx0 00001 bit 26 amx1 00000 bit 27 na 00000 bit 28 uta 11111 bit 29 todt 00001 bit 30 last 00001 bit 31 pts pts+1 pts+2 pts+3 pts+4 clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras ) gpl1 (oe )
memory controller motorola mpc801 user? manual 15-57 15 figure 15-49. exception cycle for page mode dram with extended data-out cst4 1 bit 0 cst1 1 bit 1 cst2 1 bit 2 cst3 1 bit 3 bst4 1 bit 4 bst1 1 bit 5 bst2 1 bit 6 bst3 1 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 1 bit 12 g1t3 1 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop 0 bit 24 exen 0 bit 25 amx0 0 bit 26 amx1 0 bit 27 na 0 bit 28 uta 1 bit 29 todt 1 bit 30 last 1 bit 31 exs clkout gclk1 a[0:31] rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras ) gpl1 (oe )
memory controller 15-58 mpc801 user? manual motorola 15 15.3 external master support the memory controller supports internal bus masters and, if enabled in the siumcr register, it will support accesses initiated by external bus masters. refer to section 12.12.1.1 siu module configuration register for more information. the external bus masters are classified into two types: synchronous?us masters that work with clkout and the mpc801 bus protocol to access a slave device. asynchronous?us masters that implement an asynchronous handshake with the slave device to perform a data transfer. the mc68030 and mc68360 are examples of this type of device. a synchronous master initiates a transfer by asserting the ts signal. the address bus a[0:31] must be stable throughout the transaction, starting at the rising edge of clkout in which ts is asserted until the last ta acknowledges the transfer. since the external master works synchronously with the mpc801, only setup and hold times near the rising edge of clkout are important. assuming the seme bit in the siu module configuration register is set and the ts signal is asserted, the memory controller compares the address with each one of its defined valid banks. if a match is found, control signals to the memory devices are generated and the ta signal is supplied to the master. refer to figure 15-50 for details. an asynchronous master initiates a transfer by driving the address bus and asserting the as signal. the a[0:31] signals, together with the rd/wr and tsize[0:1] signals, must be stable at setup time before the as pin is asserted. if the aeme bit in the siu module configuration register is set, the memory controller in the mpc801 synchronizes the as assertion to its internal clock and generates the control line to the external memory devices. a ta signal is given to the external master to acknowledge the transaction. all the control signals to the memory device and the ta signal are negated with the as pin. note when external masters access slaves on the bus, the internal at[0:2] signals reaching the memory controller will be forced to `100'. the baddr[28:30] pins should be used to generate addresses to memory devices during burst accesses. they duplicate the value of the a[28:30] signals when an internal master initiates a transaction on the external bus. when an external master initiates a transaction on the external bus, the baddr[28:30] signals reflect the value of the a[28:30] signals on the first memory access clock cycle. afterwards, they behave according to the memory controller.
memory controller motorola mpc801 user? manual 15-59 15 to connect to external memory devices that require address multiplexing, the mpc801 can use the gpl5a and gpl5b signals to control external multiplexing logic. the gpl5 x signal logic value is changed if you specify when any of the user-programmable machines in the memory controller control the slave access. the gpl5 x signal reflects the value of the gl5s bit in the corresponding option register in the first clock cycle of the memory device access. in the following cycles, the value is determined by the g5t4 and g5t3 bits in the user- programmable machine? ram. if upmb controls the slave access, the gl5a bit of the option register indicates that the value of gl5, g5t4 and g5t3 in the upmb controls the logical value of the gpl5a signal. gl5s is only considered for read or write accesses to memory and not for patterns initiated by the user-programmable machine as a result of an internal periodic timer request or software request. table 15-11. gpl5 signal behavior machine controlling memory access memory access clock cycle g5la g5ls g5t4 g5t3 gpl5 x gpcm x xxxx gpl5a and gpl5b do not change their value. upma first x 0 x x gpl5a is driven low at the falling edge of gclk1. 1 gpl5a is driven high at the falling edge of gclk1. second, third... x x 0 x gpl5a is driven low at the falling edge of gclk2 in the current upm cycle. 1 x gpl5a is driven high at the falling edge of gclk2 in the current upm cycle. x 0 gpl5a is driven low at the falling edge of gclk1 in the current upm cycle. x 1 gpl5a is driven high at the falling edge of gclk1 in the current upm cycle. upmb first 0 0 x x gpl5b is driven low at the falling edge of gclk1. 1 gpl5b is driven high at the falling edge of gclk1. 1 0 x x gpl5a is driven low at the falling edge of gclk1. 1 gpl5a is driven high at the falling edge of gclk1. second, third... 0 0 0 x gpl5b is driven low at the falling edge of gclk2 in the current upm cycle. 1 x gpl5b is driven high at the falling edge of gclk2 in the current upm cycle. x 0 gpl5b is driven low at the falling edge of gclk1 in the current upm cycle. x 1 gpl5b is driven high at the falling edge of gclk1 in the current upm cycle.
memory controller 15-60 mpc801 user? manual motorola 15 upmb second, third... 1x0x gpl5a is driven low at the falling edge of gclk2 in the current upm cycle. 1 x gpl5a is driven high at the falling edge of gclk2 in the current upm cycle. x 0 gpl5a is driven low at the falling edge of gclk1 in the current upm cycle. x 1 gpl5a is driven high at the falling edge of gclk1 in the current upm cycle. table 15-11. gpl5 signal behavior machine controlling memory access memory access clock cycle g5la g5ls g5t4 g5t3 gpl5 x
memory controller motorola mpc801 user? manual 15-61 15 figure 15-50. synchronous external master basic access (gpcm controlled) clock a[0:27] cs we oe data ts ta address match and compare memory device access rd/wr burst tsize a[28:31] baddr[28:30]
memory controller 15-62 mpc801 user? manual motorola 15 figure 15-51. asynchronous external master basic access (gpcm controlled) figure 15-52 illustrates a typical system configuration in which the mpc801 and an external master accesses a dram device. figure 15-53 illustrates the timing behavior of the gpl5 , baddr, and the other control signals for a burst read access initiated by an external master to a dram device. the value of the gpl5 pin in the first clock cycle of the memory device access is determined by the value of the gpl5s bit in the corresponding option register. clock a[0:27] cs we oe data as ta address match and compare memory device access rd/wr tsize a[28:31] baddr[28:30]
memory controller motorola mpc801 user? manual 15-63 15 figure 15-52. synchronous external master?pc801?ram device typical configuration gpl5 rd/wr a[0:31] a[0:27] bs [0:3] cs1 ts burst ta tsize[0:1] bi br bg bb d[0:31] baddr[28:30] dram multiplexer mpc801 external master
memory controller 15-64 mpc801 user? manual motorola 15 figure 15-53. synchronous external master?urst read access to page mode dram cst4 (bit 0) 000000000 cst1 (bit 1) 000000000 cst2 (bit 2) 000000001 cst3 (bit 3) 000000001 bst4 (bit 4) 110101010 bst1 (bit 5) 100000000 bst2 (bit 6) 101010101 bst3 (bit 7) 101010101 g0l0 (bit 8) ? g5t4 (bit 20) 011111111 g5t3 (bit 21) 000000000 - (bit 22) - (bit 23) loop (bit 24) 000000000 exen (bit 25) 001010100 amx0 (bit 26) 000000000 amx1 (bit 27) 000000000 na (bit 28) 001010100 uta (bit 29) 101010101 todt (bit 30) 000000001 last (bit 31) 000000001 rbs rbs+1 rbs+2 rbs+3 rbs+4 rbs+5 rbs+6 rbs+7 rbs+8 clkout gclk1 a[0:31] ts rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras ) burst baddr[28:29] l/4 l/4 + 1 mod 4 l/4 + 2 mod 4 l/4 + 3 mod 4 gpl5 8? ab-cd-ef-gl
memory controller motorola mpc801 user? manual 15-65 15 figure 15-54. asynchronous external master?pc801?ram device typical configuration rd/wr a[0:31] a[0:27] bs [0:3] cs1 as d[0:31] dram multiplexer mpc801 gpl5 ta tsize[0:1] br bg bb arbitration signals external master external arbiter
memory controller 15-66 mpc801 user? manual motorola 15 figure 15-55. asynchronous external master?ead access to page mode dram cst4 00000 0 bit 0 cst1 0 0 0 bit 1 cst2 0 0 1 bit 2 cst3 0 0 1 bit 3 bst4 11000 0 bit 4 bst1 1 0 0 bit 5 bst2 1 0 1 bit 6 bst3 1 0 1 bit 7 ? g4t4 bit 18 g4t3 bit 19 g5t4 1 1 1 bit 20 g5t3 0 1 1 bit 21 - bit 22 - bit 23 loop 0 0 0 0 0 0 bit 24 exen 0 0 0 0 0 0 bit 25 amx0 0 0 0 0 0 1 bit 26 amx1 0 0 0 0 0 0 bit 27 na 0 0 0 0 0 0 bit 28 uta 1 0 0 0 0 1 bit 29 todt 0 0 0 0 0 1 bit 30 last 0 0 0 0 0 1 bit 31 rss rss+1 wait wait wait rss+2 clkout gclk1 a[0:31] as rd/wr d[0:31] ta cs1 bs [0:3] (cas [0:3]) (ras ) gpl5 don? care
memory controller motorola mpc801 user? manual 15-67 15 15.4 programming the memory controller you can interface with the memory controller by using eight identical sets of two registers?he option register and the base register. there are also two identical registers (mamr and mbmr) that control the user-programmable a and b machines. there are also some general registers. 15.4.1 memory status register the memory status register (msr) is used to report parity or write-protect errors that are found when accessing the external bus. per0?arity error bank 0 this bit indicates that a parity error is detected when reading from bank 0. per0 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per0. per1?arity error bank 1 this bit indicates that a parity error is detected when reading from bank 1. per1 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per1. per2?arity error bank 2 this bit indicates that a parity error is detected when reading from bank 2. per2 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per2. per3?arity error bank 3 this bit indicates that a parity error is detected when reading from bank 3. per3 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per3. per4?arity error bank 4 this bit indicates that a parity error is detected when reading from bank 4. per4 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per4. per5?arity error bank 5 this bit indicates that a parity error is detected when reading from bank 5. per5 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per5. msr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field per0 per1 per2 per3 per4 per5 per6 per7 wper reserved
memory controller 15-68 mpc801 user? manual motorola 15 per6?arity error bank 6 this bit indicates that a parity error is detected when reading from bank 6. per6 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per6. per7?arity error bank 7 this bit indicates that a parity error is detected when reading from bank 7. per7 is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect on per7. wper?rite-protection error this bit is asserted when a write-protect error occurs. a bus monitor, if enabled, will prompt you to read this register if no ta signal is provided on a write cycle. wper is cleared by writing a one to this bit or performing a system reset. writing a zero has no effect. bits 9?5?eserved these bits are reserved and should be set to 0. 15.4.2 m emory periodic timer prescaler register the memory periodic timer prescaler register (mptpr) determines the brg prescaler value output of the prescaler used as a memory periodic timer input clock. ptp?eriodic timers prescaler this attribute determines the period of the memory periodic timers input clock. the brgclk clock is divided according to the encoding of these bits. 001x xxxx = divide by 2. 0001 xxxx = divide by 4. 0000 1xxx = divide by 8. 0000 01xx = divide by 16. 0000 001x = divide by 32. 0000 0001 = divide by 64. 1xxx xxxx = reserved. 01xx xxxx = reserved. bits 8?5?eserved these bits are reserved and should be set to 0. mptpr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ptp reserved
memory controller motorola mpc801 user? manual 15-69 15 15.4.3 base register the base register (br) contains the base address and address types that should be compared to the address bus. it also includes a memory attribute and selects the machine for memory operation handling. ba?ase address the base address field, the upper 17 bits of each base address register, and the address type code field are compared to the address on the address bus to determine if a memory bank controlled by the memory controller is being accessed by an internal bus master. these bits are used in conjunction with the am[0:16] bits of the option register. at?ddress type this field can be used to limit accesses to the memory bank to a certain address space type. these bits are used in conjunction with the atm[0:2] bits of the option register. ps?ort size this field specifies the port size of the memory region. 11 = reserved. 01 = 8-bit port size. 10 = 16-bit port size. 00 = 32-bit port size. pare?arity enable this bit is used to enable parity checking on this bank. 0 = parity checking disable. 1 = parity checking enable. br bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ba bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field ba at ps pare wp ms reserved v
memory controller 15-70 mpc801 user? manual motorola 15 wp?rite-protect this bit can restrict write accesses within the address range of a base register. if you try to write to the range of addresses specified in a base address register that has this bit set, the tea signal can be asserted by the bus monitor logic and cause this cycle to be terminated. 0 = both read and write accesses are allowed. 1 = only read accesses are allowed. the cs x and ta signals are not asserted by the memory controller on write cycles to this memory bank. wper is set in the mstat register if you try to write to this memory bank. ms?achine select this field specifies the machine that is selected for memory operations handling. 00 = gpcm. 0x = reserved. 10 = upma. 11 = upmb. bits 26?0?eserved these bits are reserved and should be set to 0. v?alid bit this bit indicates that the contents of the base and option registers are valid. the cs signal does not assert until v is set. an access to a region that does not have v set can causes a bus monitor timeout. following a system reset, this bit is set in br0. 0 = this bank is invalid. 1 = this bank is valid.
memory controller motorola mpc801 user? manual 15-71 15 15.4.4 option register the option register (or) contains the address and address type mask bit for address bus comparison. it also includes the cs general bits and all the gpcm parameters. am?ddress mask these read/write bits provides masking on any corresponding bits in the associated base register. by masking the address bits independently, external devices of different size address ranges can be used. any clear bit masks the corresponding address bit and any set bit causes the corresponding address bit to be used in address pin comparison. address mask bits can be set or cleared in any order in the field, thus allowing a resource to reside in more than one area of the address map. be aware that following a system reset, these bits are reset in or0. atm?ddress type mask these bits can be used to mask certain address type bits, thus allowing more than one address space type to be assigned to a chip-select. any set bit causes the corresponding address type code bits to be used as part of the address comparison and any cleared bit masks the corresponding address type code bit. the atm bits should be cleared so that address type codes are ignored as part of the address comparison. be aware that following a system reset, these bits are reset in or0. csnt?hip-select negation time this bit is used to determine when the cs /we signals are negated during an external memory write access handled by the general-purpose chip-select machine. this helps in meeting address/data hold time requirements for slow memories and peripherals. be aware that following a system reset, this bit is set in or0. 0 = cs / we are negated normally. 1 = cs / we are negated a quarter of a clock earlier. sam?tart address multiplex this bit determines how the address is output on the first cycle of an external memory access read or write when the memory access is handled by the upma or upmb. 0 = address pins are the address requested by the internal master. 1 = address pins are the address requested by the internal master multiplexed according to the ama field (if upma is selected to control the memory access) or the amb field (if upmb is selected). or bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field am bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field am atm csnt /sam acs/ g5la,g5ls bi scy seta trlx ehtr res
memory controller 15-72 mpc801 user? manual motorola 15 acs?ddress to chip-select setup this bit can be used when the external memory access is handled by the general-purpose chip-select machine (gpcm). it allows cs assertion to be delayed when there is an address change. be aware that following a system reset, these bits are set in or0. 00 = cs is output at the same time as the address lines. 01 = reserved. 10 = cs is output a quarter of a clock later than the address lines. 11 = cs is output half a clock later than the address lines. g5la/g5ls?eneral-purpose line 5 a and line 5 start these bits determine how the gpl5 pin is output when the memory access is handled by the upma or upmb. g5la (valid only if ms = 11 in the br ): 0 = output gpl5 on the gpl5_b signal. 1 = output gpl5 on the gpl5_a signal. g5ls: 0 = the gpl5 signal is driven low on the falling edge of gclk1 during the first clock cycle of a read or write memory access. 1 = the gpl5 signal is driven high on the falling edge of gclk1 during the first clock cycle of a read or write memory access. bi?urst inhibit this bit determines whether or not this memory bank supports burst accesses. when a burst does not occurs, the memory controller drives the bi signal active when accessing this memory region. if the machine selected to handle this access is the gpcm, this bit must be set to 1. be aware that following a system reset, this bit is set in or0. 0 = drive bi negated. the bank supports burst accesses. 1 = drive bi asserted. the bank does not support burst accesses.
memory controller motorola mpc801 user? manual 15-73 15 scy?ycle length in clocks these bits determine the number of wait states inserted in the cycle when the general-purpose chip-select machine handles the external memory access and it is the main parameter for determining the cycle? length. the total cycle length may vary, depending on the settings of other timing attributes. the total memory access length is (2 + scy) clocks if an external ta response has been selected for this memory bank (by setting the seta bit), then scy[0:3] bits are not used. be aware that following a system reset, these bits are set to 1111 in or0. 0000 = 0 clock cycle wait state. 0001 = 1 clock cycle wait state. 0010 = 2 clock cycle wait states. 0011 = 3 clock cycle wait states. 0100 = 4 clock cycle wait states. 0101 = 5 clock cycle wait states. 0110 = 6 clock cycle wait states. 0111 = 7 clock cycle wait states. 1000 = 8 clock cycle wait states. 1001 = 9 clock cycle wait states. 1010 = 10 clock cycle wait states. 1011 = 11 clock cycle wait states. 1100 = 12 clock cycle wait states. 1101 = 13 clock cycle wait states. 1110 = 14 clock cycle wait states. 1111 = 15 clock cycle wait states. seta?external transfer acknowledge this bit specifies when the ta signal is externally generated once the gpcm is selected to handle the memory access that was initiated to this memory region. be aware that following a system reset, this bit is reset in or0. 0 = ta is internally generated by the memory controller, unless asserted earlier. 1 = ta is generated by external logic. trlx?iming relaxed when this bit is asserted, it modifies the timing of the signals controlling the memory devices once the gpcm is selected to handle the memory access that was initiated to this memory region. be aware that following a system reset, this bit is set in or0. 0 = normal timing is generated by the gpcm. 1 = relaxed timing is generated by the gpcm.
memory controller 15-74 mpc801 user? manual motorola 15 ehtr?xtended hold time on read accesses when this bit is asserted, it inserts an idle clock cycle after a read access from the current bank and any mpc801 write or read access to a different bank occurs. be aware that following a system reset, this bit is reset in or0. 0 = normal timing is generated by the memory controller. 1 = extended hold time is generated by the memory controller. bit 31?eserved this bit is reserved and should be set to 0. 15.4.5 machine a mode register the machine a mode register (mamr) contains the control bits for the user-programmable machine a. pta?eriodic timer a period these bits affect the periodic timer a and determine the timer period according to the following equation: for example, for a 25mhz brgclk with a required service rate of 15.6 microseconds, given ptp = 32, the pta value should be 12 decimal. 12/ (25mhz / 32) = 15.36 microseconds, which is less than the required service period of 15.6 microseconds. ptae?eriodic timer a enable this bit allows the periodic timer a to request service. be aware that following a system reset, this bit is reset. 0 = periodic timer a is disabled. 1 = periodic timer a is enabled. ama?ddress multiplex size a these bits determine how the address of the current memory cycle is output on the address pins. the content of the ram array in the upma controls the address output on the pins. these bits are used to connect the mpc801 to dram devices that require row and column addresses to be multiplexed on the same pins. mamr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field pta ptae ama res dsa res bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field g0cla gpla 4dis rlfa wlfa tlfa timerperiod pta f mptc --------------------- ? ?? =
memory controller motorola mpc801 user? manual 15-75 15 bits 12 and 15?eserved these bits are reserved and should be set to 0. dsa?isable timer period this bit guarantees a minimum time between accesses to the same memory bank if it is controlled by the upma. the todt turns on the disable timer in the ram array and, when expired, the upma allows the machine access to issue a memory pattern to the same memory region. accesses to different memory regions can be handled by the same upma. to avoid conflicts with successive accesses to different memory regions, the minimum pattern in the ram array for a serviced request should be equal to or greater than the period established by this bit. 00 = 1-cycle disable period. 01 = 2-cycle disable period. 10 = 3-cycle disable period. 11 = 4-cycle disable period. g0cla?eneral line 0 control a these bits determine the address signal that is output to the gpl0 pin when the upma is selected to control memory access. 000 = a12. 001 = a11. 010 = a10. 011 = a9. 100 = a8. 101 = a7. 110 = a6. 111 = a5. gpla4dis?pla4 output line disable this bit determines whether or not the upwaita/gpla4 pin will behave as an output line controlled by the corresponding bits in the upma array (gpl4a ). be aware that following a system reset, this bit is set. 0 = upwaita/gpla4 behaves as gpla4 when the g4t4/dlt3 bit in the upma is interpreted as g4t4 and when the g4t3/waen bit in the upma is interpreted as g4t3. 1 = upwaita/gpla4 behaves as upwaita when the g4t4/dlt3 bit in the upma is interpreted as dlt3 and when the g4t3/waen bit in the upma is interpreted as waen.
memory controller 15-76 mpc801 user? manual motorola 15 rlfa?ead loop field a these bits determine the number of times a loop defined in the upma is executed for a burst read or single beat read pattern. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times. wlfa?rite loop field a this field determines the number of times a loop defined in the upma is executed for a burst write or a single beat write patterns. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times.
memory controller motorola mpc801 user? manual 15-77 15 tlfa?imer loop field a these bits determine the number of times a loop defined in the upma is executed for a periodic timer service pattern. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times. 15.4.6 m achine b mode register the machine b mode register (mbmr) contains the control bits for the user-programmable b machine. ptb?eriodic timer b this bit affects the periodic timer b and determine the timer period according to the following equation: for example, a 25mhz brgclk with a required service rate of 15.6 microseconds, given ptp = 32, the ptb value should be 12 decimal. 12/ (25mhz / 32) = 15.36 microseconds, which is less than the required service period of 15.6 microseconds. mbmr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ptb ptbe amb res dsb res bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field g0clb gplb 4dis rlfb wlfb tlfa timerperiod pt b f mptc ---------------- - ? ?? =
memory controller 15-78 mpc801 user? manual motorola 15 ptbe?eriodic timer b enable this bit allows the periodic timer b to request service. be aware that following a system reset, this bit is reset. 0 = periodic timer b is disabled. 1 = periodic timer b is enabled. amb?ddress multiplex size b these bits determine how the address of the current memory cycle is output on the address pins. the content of the ram array in the upmb controls the address output on the pins. these bits are used to connect the mpc801 to dram devices that require row and column addresses to be multiplexed on the same pins. bits 12 and 15?eserved these bits are reserved and should be set to 0. dsa?isable timer period this bit guarantees a minimum time between accesses to the same memory bank if it is controlled by the upmb. the todt turns on the disable timer in the ram array and, when expired, the upmb allows the machine access to issue a memory pattern to the same memory region. accesses to different memory regions can be handled by the same upmb. to avoid conflicts with successive accesses to different memory regions, the minimum pattern in the ram array for a serviced request should be equal to or greater than the period established by this bit. 00 = 1-cycle disable period. 01 = 2-cycle disable period. 10 = 3-cycle disable period. 11 = 4-cycle disable period. g0clb?eneral line 0 control b these bits determine the address signal that is output to the gpl0 pin when the upmb is selected to control memory access. 000 = a12. 001 = a11. 010 = a10. 011 = a9. 100 = a8. 101 = a7. 110 = a6. 111 = a5.
memory controller motorola mpc801 user? manual 15-79 15 gplb4dis?plb4 output line disable this bit determines whether or not the upwaitb/gplb4 pin will behave as an output signal controlled by the corresponding bits in the upmb array (gpl4b ). be aware that following a system reset, this bit is set. 0 = upwaitb/gplb4 behaves as gplb4 when the g4t4/dlt3 bit in the upmb is interpreted as g4t4 and when the g4t3/waen bit in the upmb is interpreted as g4t3. 1 = upwaitb/gplb4 behaves as upwaitb when the g4t4/dlt3 bit in the upmb is interpreted as dlt3 and when the g4t3/waen bit in the upmb is interpreted as waen. rlfb?ead loop field b these bits determine the number of times a loop defined in the upmb is executed for a burst read or single beat read pattern. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times.
memory controller 15-80 mpc801 user? manual motorola 15 wlfb?rite loop field b this field determines the number of times a loop defined in the upmb is executed for a burst write or a single beat write patterns. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times. tlfb?imer loop field b these bits determine the number of times a loop defined in the upmb is executed for a periodic timer service pattern. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times.
memory controller motorola mpc801 user? manual 15-81 15 15.4.7 memory command register the memory command register (mcr) controls user-programmable read-write operations. it also stimulates upm routine execution. op?ommand opcode this field determines the command to be executed by the machine that is specified in the um field. 00 = write the contents of the mdr bit into the ram location pointed by the mad bit in the upm that is specified in the um bit. 01 = read the contents of the ram location pointed by the mad bit in the upm that is specified in the um bit into the mdr. 10 = run the pattern written in the ram array of the upm specified in the um bit servicing the memory bank that is specified in the mb bit. the pattern run starts at the location pointed to by the mad bit and continues until the last bit in the ram is set. 11 = reserved. bits 2??eserved these bits are reserved and should be set to 0. um?ser machine these bits indicate the user-programmable machine to which the command is executed. 0 = upma. 1 = upmb. bits 9?5?eserved these bits are reserved and should be set to 0. mcr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field op reserved um reserved bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field mb res mclf reserved mad
memory controller 15-82 mpc801 user? manual motorola 15 mb?emory bank these bits indicate the enabling of the cs signal when a run_pattern command is executed. 000 = cs0 enabled. 001 = cs1 enabled. 010 = cs2 enabled. 011 = cs3 enabled. 100 = cs4 enabled. 101 = cs5 enabled. 110 = cs6 enabled. 111 = cs7 enabled. bit 19, 24, 25?eserved these bits are reserved and should be set to 0. mclf?emory command loop field these bits determine the number of times a loop is executed for a memory command service pattern. 0001 = the loop is executed 1 time. 0010 = the loop is executed 2 times. 0011 = the loop is executed 3 times. 0100 = the loop is executed 4 times. 0101 = the loop is executed 5 times. 0110 = the loop is executed 6 times. 0111 = the loop is executed 7 times. 1000 = the loop is executed 8 times. 1001 = the loop is executed 9 times. 1010 = the loop is executed 10 times. 1011 = the loop is executed 11 times. 1100 = the loop is executed 12 times. 1101 = the loop is executed 13 times. 1110 = the loop is executed 14 times. 1111 = the loop is executed 15 times. 0000 = the loop is executed 16 times. mad?achine address these bits make up the executed command? ram address pointer.
memory controller motorola mpc801 user? manual 15-83 15 15.4.8 memory data register the memory data register (mdr) is used as a data source in upm write operations and a destination in upm read operations. md?emory data these bits represent the data to be written into the ram array when a write command is issued to the memory command register. it is also the data read from the array when a read command is issued. 15.4.9 memory address register the memory address register (mar) contains an address to be output on the address pin that is controlled by the am x bit in the user-programmable machine. a?emory address these bits are output to the address signals that are controlled by the am x bits in the user-programmable machine. mdr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field md bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field md mar bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field a bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field a
memory controller 15-84 mpc801 user? manual motorola 15 figure 15-56. blank worksheet for a upm cst4 bit 0 cst1 bit 1 cst2 bit 2 cst3 bit 3 bst4 bit 4 bst1 bit 5 bst2 bit 6 bst3 bit 7 g0l0 bit 8 g0l1 bit 9 g0h0 bit 10 g0h1 bit 11 g1t4 bit 12 g1t3 bit 13 g2t4 bit 14 g2t3 bit 15 g3t4 bit 16 g3t3 bit 17 g4t4 bit 18 g4t3 bit 19 g5t4 bit 20 g5t3 bit 21 - bit 22 - bit 23 loop bit 24 exen bit 25 amx0 bit 26 amx1 bit 27 na bit 28 uta bit 29 todt bit 30 last bit 31 rss rss+1 rss+2 clkout gclk1
motorola mpc801 user? manual 16-1 16 section 16 serial communication modules this section discusses the five serial communication modules of the mpc801: two universal asynchronous receiver transmitter controllers serial peripheral interface ? 2 c controller parallel i/o port 16.1 the uart controllers the universal asynchronous receiver transmitter (uart) controllers provide serial communication with external devices (modems and other computers) using the standard ?tart-stop?format. they perform all normal operations associated with ?tart-stop? asynchronous communication. the serial data is transmitted and received at standard bit rates using the internal baud rate generator. for those applications that need other bit rates, a 1 clock mode is provided. however, you must provide general-purpose chip-select machine the data bit clock. figure 4-1 illustrates the block diagram of this module. figure 16-1. uart block diagram rx fifo baud rate generator tx fifo receiver transmitter serial interface interface infra-red rxd txd gpio cts rts sub_bus
serial communication modules 16-2 mpc801 user? manual motorola 16 16.1.1 features the following list summarizes the main features of the uart controllers: full duplex operation flexible 5-wire serial interface direct support of irda physical layer protocol robust receiver data sampling with noise filtering 8-byte fifos for transmit and receive 7- and 8-bit operation with optional parity generation and detection of break baud rate generator flexible clocking options standard baud rates of 300bps to 115.2kbps with a 16 sample clock external 1 clock for high-speed synchronous communication eight maskable interrupts optional low-power idle mode 16.2 serial interface signals you can access the following signals, which become default signals after reset. if you do not need any uart signals, program the appropriate port as an i/o. transmit data (txd)?his pin is the transmitter serial output. while in normal mode, non return to zero (nrz) data is output. while in irda mode, a 3- or 16-bit period pulse is output for each ?ero?bit transmitted. for rs-232 applications, this pin must be connected to an rs-232 transmitter. for infra-red applications this pin can directly drive an infra-red led. clear to send (cts )?his active low input is used to control the transmitter. normally, the transmitter waits until this signal is active (low) before a character is transmitted. if the icts bit of the transmitter register is set, the transmitter sends a character whenever one is ready to transmit. this pin can then be used as a general-purpose input whose status is read in the ctss bit of the transmitter register. it can post an interrupt on any transition of this pin if the interrupt is enabled. receive data (rxd)?his pin is the receiver serial input. while in normal operation, nrz data is expected. however, while in infra-red mode, a narrow pulse is expected for each ?ero?bit received. external circuitry must be used to convert the infra-red signal to an electrical signal. rs-232 applications need an external rs-232 receiver to convert from rs-232 voltage levels.
serial communication modules motorola mpc801 user? manual 16-3 16 ready to send (rts )?his output pin serves two basic purposes. normally, the receiver indicates that it is ready to receive data by asserting this pin (low), which would be connected to the end transmitter? cts pin. when the receiver detects a pending overrun, it negates this pin. however, for other applications, the rts pin can be a general-purpose output controlled by the rts pin in the global register. general-purpose input/output (gpio)?his bidirectional pin serves several purposes. it can be a general-purpose input that posts interrupts on any transition or it can be a general-purpose output controlled by the gpio bit in the baud register. it can also serve as the clock source to the baud rate generator and output the bit clock at the selected baud rate. 16.2.1 sub-block description this uart module is easy to use from both a hardware and software perspective because five working registers perform all possible status and control functions. in addition, all register bits can be read and most of them are read/write. the modem control signals are flexible.the cts pin is an input that can either provide hardware flow-control to the transmitter or be used as a general-purpose input. a maskable interrupt is posted on each transition of this signal. the rts pin is an output from the receiver that indicates when the receiver fifo is not full. this bit can be configured as a general-purpose output. a gpio pin is provided that can be used to bring an external bit-clock into the module or it can be used as a general-purpose input with a maskable interrupt posted on each transition. it can even be configured as an output that provides a bit-clock or signal under software control. the uart consists of four submodules?he transmitter, receiver, baud rate generator, and global controller interface. 16.2.1.1 the transmitter. the transmitter accepts a parallel character from the powerpc core and transmits it serially. while the fifo is empty, the transmitter outputs a continuous idle bit (1 in nrz mode and 0 in irda mode). when a character is available for transmission, the start, stop, and parity (if enabled) bits are added to the character and it is serially shifted at the selected bit rate. the transmitter posts a maskable interrupt when it is ready for parallel data. three interrupt sources are available. if you want to take full advantage of the 8-byte fifo, you should enable the fem interrupt. in the interrupt service routine, the fifo should be interrogated after each byte is loaded. if there is space available and the txaven bit of the control register is set, more data is loaded into the fifo. another interrupt from the transmitter will not be generated until the fifo has completely emptied. if your software has a large interrupt service latency, the fhal of the transmitter register interrupt can be used. in this case, an interrupt is generated when the occupancy in the fifo is less than half of its size. if you do not need the fifo, you should use the txaven interrupt of the control register. an interrupt is generated when at least one space is available in the fifo.
serial communication modules 16-4 mpc801 user? manual motorola 16 cts controls the flow of the serial data as needed. if cts is negated, the transmitter finishes sending the character in progress, then stops and waits for cts to become asserted. a brk character can be generated by setting the sbrk bit of the transmitter register. however, your software must be aware of the baud rate. the sbrk bit must be asserted for a sufficient amount of time to generate a valid brk character. for debugging purposes, parity errors can be generated. the transmitter operates from the 1 clock provided by the baud rate generator. while the infra-red interface is enabled, the transmitter produces a pulse that is 3 / 16 of a bit time for each ?ero?bit sent. the txd port can drive an infra-red led or interface to popular irda transceivers. 16.2.1.1.1 transmitter register. this register controls the operation of the transmitter and resets to $0000. fem?ifo empty this read-only bit indicates that the transmit fifo is empty. 0 = transmit fifo is not empty. 1 = transmit fifo is empty. fhal?ifo half this read-only bit indicates whether or not the transmit fifo is half full. 0 = transmit fifo is less than half full. 1 = transmit fifo is at least half full. txav?x available this read-only bit indicates that the transmit fifo has at least one slot available for data. 0 = transmit is full. 1 = transmit is not full. sbrk?end break this bit forces the transmitter to send a brk character. the transmitter finishes sending the character in progress and then sends the brk bit until this bit is reset. you are responsible for ensuring that this bit is high for a sufficient amount of time to generate a valid brk bit. then you continue filling the fifo and any remaining characters are transmitted when the brk bit is terminated. 0 = do not send the brk bit. 1 = send the brk bit. transmitter bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field fem fhal txav sbrk icts res ctss ctsd tx data reset $e000
serial communication modules motorola mpc801 user? manual 16-5 16 icts?gnore cts when it is high, this bit forces the cts pin to be asserted, thus effectively ignoring the external pin. while in this mode, the cts pin can be used as a general-purpose input. 0 = transmit only while the cts pin is asserted. 1 = ignore the cts pin. ctss?ts status this bit indicates the current status of the cts pin. a snapshot of the pin is taken before this bit is presented to the data bus. when the icts pin is high, this bit can be used as a general-purpose input. 0 = cts pin is low. 1 = cts pin is high. ctsd?ts delta when it is high, this bit indicates that the cts pin has been changed. it generates a maskable interrupt. the current status of the cts pin can be found on the ctss bit. the cts interrupt is cleared by writing a zero to this bit. 0 = cts pin has not been changed since it was last cleared. 1 = cts pin has been changed. tx data?ransmit data these bits are the parallel transmit data inputs. when in 7-bit mode, bit 8 is ignored. when in 8-bit mode, all bits are used. data is transmitted beginning with the least-significant bit. a new character is transmitted when these bits are written. 16.2.1.2 the receiver. the receiver accepts a serial datastream and converts it into a parallel character. it operates in two modes?6 and 1 . in 16 mode, it searches for a start bit, qualifies it, then samples the succeeding data bits at the bit? center. jitter tolerance and noise immunity are provided by sampling at a 16 rate and using a voting technique to clean up the samples. in 1 mode, the rxd bit is sampled on each rising edge of the bit clock. once the start bit has been found, the data, parity, and stop bits are shifted in. if parity is enabled, it is checked and its status is reported in the receiver register. similarly, frame errors and breaks are checked and reported. when a new character is ready to be read by the core, the rts pin is asserted and an interrupt is posted (if enabled). when the receiver register is read as a 16-bit word, the complete fifo status, the four status bits, and the received character byte are read by the core. the rts pin can be configured as an output that indicates the receiver is ready for data or it can be directly controlled by the software.
serial communication modules 16-6 mpc801 user? manual motorola 16 as with the transmitter, the receiver fifo is flexible. if your software has a short interrupt latency, the ffu interrupt can be enabled. one space is available in the fifo when this interrupt is generated. by reading the receiver register as a word, the status of the fifo is presented to the core along with the data. if the fifo status indicates that data remains in the fifo, it can then be emptied byte-by-byte. if the software has a longer latency, the fhal interrupt can be used. this interrupt is generated when at least four bytes in the fifo are ready to be read. if the fifo is not needed, the drdy interrupt can be used. this interrupt is generated whenever one or more characters are in the fifo. when the infra-red interface is enabled, the receiver expects narrow pulses for each ?ero?bit received. otherwise, normal nrz is expected. an irda transceiver, external to the mpc801, transforms the infra- red signal to an electrical signal. note any program that deals with the uart by polling must read the fifo status bit from the receiver register. since a normal read from that register has a side effect, it updates the fifo. therefore, you should use a special receiver register address that returns receiver data, but does not affect the fifo. 16.2.1.2.1 receiver register. this read-only register controls the receiver and the status of each received character is read from this register. the highest nibble of this register resets to $0. the other bits contain random data until the first character is received. there are two addresses for this register. generally, reading this register updates the receiver fifo. reading via the special address does not affect the fifo, which is used for polling the channel. ffu?ifo full this bit indicates that the receive fifo is full and may generate an overrun. 0 = receive fifo contains more than one available space. 1 = receive fifo contains a maximum of one available space. fhal?ifo half this bit indicates whether or not the receive fifo is half full. 0 = receive fifo is less than half full. 1 = receive fifo is at least half full. receiver bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ffu fhal drdy res ovr ferr brk perr rx data reset $0xxx
serial communication modules motorola mpc801 user? manual 16-7 16 drdy?ata ready this bit indicates that at least one byte is in the receive fifo. 0 = receive fifo is empty. 1 = receive fifo is not empty. ovr?ifo overrun when it is high, this bit indicates that the receiver overwrote data in the fifo. the character with this bit set is valid, but at least one previous character was lost. under normal circumstances, this bit should never be set. it indicates that your software is not keeping up with the incoming data rate. this bit is up-to-date and valid for each received character. 0 = no fifo overrun. 1 = a fifo overrun is detected. ferr?rame error when it is high, this bit indicates that the current character had a framing error (missing the stop bit). the data is possibly corrupted. this bit is updated for each character read from the fifo. 0 = current character has no framing error. 1 = current character has a framing error. brk?reak when it is high, this bit indicates that the current character is a break. the data bits are all zero and the stop bit is also zero. the ferr bit will always be set when this bit is set. if odd parity is selected, the perr bit will be set when this bit is set. this bit is updated for each character read from the fifo. 0 = current character is not a break character. 1 = current character is a break character. perr?arity error when it is high, this bit indicates that the current character has a parity error and the data could be corrupted. this bit is updated for each character read from the fifo. while parity is disabled, this bit always reads zero. rx data?eceive data these bits are the next characters received into the fifo. they have no meaning if the drdy bit is zero. when in 7-bit mode, the most-significant bit is forced to zero. when in 8-bit mode, all bits are active.
serial communication modules 16-8 mpc801 user? manual motorola 16 16.2.1.3 the baud rate generator. the baud rate generator provides bit clocks to the transmitter and receiver blocks. it consists of a prescaler that divides the clock source by any integer between 2 and 64. the output of the prescaler is then further divided by a 2 n divider. eight taps are available at 1, 2, 4, 8, 16, 32, 64, and 128. the selected tap is the 16 clock for the receiver. this clock is even further divided by 16 to provide the 50% duty-cycle 1 clock to the transmitter. the baud rate generator has enough flexibility to provide almost any standard baud rate from a variety of clock frequencies. the baud rate generator is flexible in that its master clock source can be the baud rate generator clock or it can be provided by the gpio pin. by configuring the proper bit in port b as an input and setting the baud source bit to 1, the baud rate generator can be driven by an external signal. for synchronous applications, the gpio pin can also be configured as an input or output for the 1 bit clock. 16.2.1.4 the global controller interface. the global controller interface contains the baud control register and the control register, as well as all global logic. the interrupt line is the logical-or of the eight interrupt sources. the interrupt level that is sent to the powerpc core is user programmable. when the uarten bit is low, the master clock is disabled. in this mode, power consumption is reduced to a minimum. 16.2.1.4.1 control register. this register controls the overall operation of the uart controller and it resets to $0000. uarten?art enable this bit enables the uart controller. when it is low, the uart controller is disabled and in low-power mode. when it is high, the uart is active. 0 = the uart controller is disabled. 1 = the uart controller is enabled. note the status bits of the baud control, receiver, and transmitter registers are not valid unless the uarten bit is set. rxen?x enable this bit enables the receiver block. when this bit is low, the receiver is disabled and the receive fifo is flushed. 0 = receiver is disabled and receive fifo is flushed. 1 = receiver is enabled. control 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 uart en rx en tx en rxclk cont pen ode sl cl gpio deen cts deen rx fuen rx haen rx rdyen tx emen tx haen tx aven reset value: $0000
serial communication modules motorola mpc801 user? manual 16-9 16 txen?x enable this bit enables the transmitter block. when this bit is low, the transmitter is disabled and the transmit fifo is flushed. 0 = transmitter is disabled and transmit fifo is flushed. 1 = transmitter is enabled. rxclkcont?eceiver clock control this bit controls the operating mode of the receiver. when this bit is low, the receiver is in 16 mode where it synchronizes to the incoming datastream and samples at the perceived center of each bit period. when it is high, the receiver is in 1 mode where it samples the datastream on each rising edge of the bit clock. 0 = 16 clock mode. 1 = 1 clock mode. pen?arity enable this bit controls the parity generator in the transmitter and the parity checker in the receiver. when this bit is high, they are enabled. when it is low, they are disabled. 0 = parity is disabled. 1 = parity is enabled. ode?dd even this bit controls the sense of the parity generator and checker. when it is high, odd parity is generated and expected. when it is low, even parity is generated and expected. this bit does not function if the pen bit is low. 0 = even parity. 1 = odd parity. sl?top bits this bit controls the number of stop bits transmitted after a character. when it is high, two stop bits are sent. when it is low, one stop bit is sent. however, this bit has no effect on the receiver that expects one or more stop bits. 0 = one stop bit is transmitted. 1 = two stop bits are transmitted. cl?haracter length this bit controls the character length. when it is high, the transmitter and receiver are in 8-bit mode. when it is low, they are in 7-bit mode. the transmitter ignores d7 and the receiver sets it to zero. 0 = 7-bit transmit and receive character length. 1 = 8-bit transmit and receive character length.
serial communication modules 16-10 mpc801 user? manual motorola 16 gpiodeen?pio delta enable this bit enables an interrupt when the gpio pin (configured as an input) changes state. the current state of the gpio pin is read in the baud control register. 0 = gpio interrupt is disabled. 1 = gpio interrupt is enabled. ctsdeen?ts delta enable when it is high, this bit enables an interrupt as the cts pin changes state. when it is low, this interrupt is disabled. the current status of the cts pin is read in the transmitter register. 0 = cts interrupt is disabled. 1 = cts interrupt is enabled. rxfuen?x full enable when it is high, this bit enables an interrupt as the receiver fifo becomes full. 0 = rx full interrupt is disabled. 1 = rx full interrupt is enabled. rxhaen?x half enable when it is high, this bit enables an interrupt as the receiver fifo gets more than half full. 0 = rx half interrupt is disabled. 1 = rx half interrupt is enabled. rxrdyen?x ready enable when it is high, this bit enables an interrupt as the receiver accumulates at least one data byte in the fifo. when it is low, this interrupt is disabled. 0 = rx interrupt is disabled. 1 = rx interrupt is enabled. txemen?x empty enable when it is high, this bit enables an interrupt as the transmitter fifo becomes empty and needs data. when it is low, this interrupt is disabled. 0 = tx empty interrupt is disabled. 1 = tx empty interrupt is enabled. txhaen?x half enable when it is high, this bit enables an interrupt as the transmit fifo gets more than half empty. when it is low, the tx half interrupt is disabled. 0 = txhaen interrupt is disabled. 1 = txhaen interrupt is enabled.
serial communication modules motorola mpc801 user? manual 16-11 16 txaven?x available enable when it is high, this bit enables an interrupt as the transmitter makes a slot available in the fifo. when it is low, the tx avail interrupt is disabled. 0 = txaven interrupt is disabled. 1 = txaven interrupt is enabled. 16.2.1.4.2 baud control register. this register controls the operation of the baud rate generator and the gpio pin. gdel?eneral-purpose input delta this bit indicates that a change occurred on the gpio pin while the gpio pin is used as an input pin. if the gpio interrupt is enabled, this bit posts an interrupt. this bit is cleared by writing zero to clear the gpio interrupt. 0 = gpio pin has not been changed since it was last cleared. 1 = gpio pin has been changed. gpio?eneral-purpose input/output this bit contains the current status of the gpio pin. if gpio is configured as an input, the user can only read this bit. if it is configured as an output, this bit controls the pin. 0 = gpio pin is low. 1 = gpio pin is high. gdir?eneral-purpose input/output direction this bit controls the direction of the gpio pin. when it is high, the pin is an output. when it is low, gpio is an input. 0 = gpio pin is an input. 1 = gpio pin is an output. gsrc?eneral-purpose input/output source this bit controls the source of the gpio pin. when it is high, the source is the 1 clock from the baud rate generator. when it is low, the source is the gpio bit. however, when the gpio is an input pin, this bit does not function. 0 = gpio is driven by the gpio bit. 1 = gpio is driven by the bit clock from the baud generator. baud control bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gdel gpio g dir gsrc bsrc div reserved pre reset $003f
serial communication modules 16-12 mpc801 user? manual motorola 16 bsrc?aud source this bit controls the clock source to the baud rate generator. 0 = baud generator source is baud rate generator clock. 1 = baud generator source is the gpio pin, which must be an input pin. div?ivider these bits control the clock frequency generated by the baud generator and are encoded as follows: 000 = divide by 1. 001 = divide by 2. 010 = divide by 4. 011 = divide by 8. 100 = divide by 16. 101 = divide by 32. 110 = divide by 64. 111 = divide by 128. bits 8??eserved these bits are reserved and should be set to 0. pre?rescaler these bits control the divide value of the baud generator prescaler. the value of the pre bit must be greater than or equal to 1 or an erroneous operation can occur. the divide value is determined by the following formula: prescaler divide value = 65 (decimal) ?pre 16.2.1.4.3 typical asynchronous communication baud rate examples. the required values of the div and pre fields for typical bit rates of asynchronous communication is shown below in table 4-1. notice that for this mode, the internal clock rate is assumed 16 the baud rate.
serial communication modules motorola mpc801 user? manual 16-13 16 16.2.1.4.4 global register. this register contains global control and testing bits of the uart block and resets to $0000. bits 0, 4?, and 12?eserved these bits are reserved and should be set to zero. clsrc?lock source this bit selects the source of the 1 bit clock for transmit and receive. when it is high, the bit clock is derived from the gpio pin and must be configured as an input. when it is low (normal), the bit clock is supplied by the baud rate generator. this bit allows high-speed synchronous applications in which a clock is provided by the external system. 0 = bit clock is generated by baud rate generator. 1 = bit clock is supplied by gpio. fperr?orce parity errors when this bit is high, it forces the transmitter to generate parity errors if parity is enabled. this bit is provided for system debugging. 0 = generate normal parity. 1 = generate a parity error. table 16-1. typical baud rates of asynchronous communication baud rates mpc801 system frequency (mhz) 20 24.5760 33 divider pre- scaler actual frequency divider pre- scaler actual frequency divider pre- scaler actual frequency 300 7 32 295.93 7 25 300 7 11 298.39 600 6 32 591.85 6 25 600 6 11 596.79 1,200 5 32 1183.7 5 25 1200 5 11 1193.6 2,400 4 32 2367.4 4 25 2400 4 11 2387.2 4,800 3 32 4735 3 25 4800 3 11 4774 9,600 2 32 9470 2 25 9600 2 11 9549 19,200 1 32 18939 1 25 19200 1 11 19097 38,400 0 32 37879 0 25 38400 0 11 38194 57,600 0 43 56818 0 38 56889 0 29 57292 115,200 0 54 113636 0 52 118154 0 47 114583 note: all values are decimal. global bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field res clsrc fperr loop reserved rxpol txpol rtsc rts irden irdal res uipl [0:2] reset : $e000
serial communication modules 16-14 mpc801 user? manual motorola 16 loop?oopback this bit controls a loopback from the transmitter to the receiver. when this bit is high, the receiver input is internally connected to the transmitter and ignores the rxd pin. the transmitter is unaffected by this bit. the receiver can be in 16 ? or 1 ? clock mode for proper operation. this bit is provided for system testing. 0 = normal receiver operation. 1 = internally connect transmitter output to receiver input. rxpol?eceived data polarity this bit selects the function of the rxd pin. 0 = normal. 1 = inverted rxd. txpol?ransmit data polarity this bit selects the function of the txd pin. 0 = normal. 1 = inverted txd. rtsc?ts control this bit selects the function of the rts pin. 0 = rts pin is controlled by the rts bit. 1 = rts pin is controlled by the receiver fifo. when the fifo is full (one slot remaining), rts is negated. rts?eady to send this bit controls the rts pin while the rtsc bit is zero. 0 = rts pin is 1. 1 = rts pin is 0. irden?rda enable this bit enables the irda interface. 0 = normal nrz operation. 1 = irda operation. irdal?rda loopback this bit controls a loopback from the transmitter to the receiver in the irda interface. it is provided for system testing. 0 = no infra-red loop. 1 = connect the infra-red transmit to the infra-red receiver.
serial communication modules motorola mpc801 user? manual 16-15 16 note the loop bit must be zero for irda interface loopback testing. uipl?art interrupt priority level this bit contains the priority request level of the uart interrupt that is sent to interrupt level 0-7. 16.3 the serial controller the serial controller module serves both the serial peripheral interface and the inter-integrated circuit (i 2 c) modules. its primary responsibility is to act as an interface between the u-bus and peripheral bus. it can also generate a reset signal to both the serial peripheral interface and i 2 c modules, according to the powerpc core commands. 16.3.1 programming the serial controller 16.3.1.1 serial controller command register. the read/write serial controller command (seccom) register controls the serial peripheral interface and i 2 c operation modes. rst?oftware reset command this bit is set by the core and cleared by the serial controller. it is useful when the core wants to reset the registers and state machines of the i 2 c and serial peripheral interface channels. this command does not affect the parallel i/o registers. bits 1??eserved these bits are reserved and should be set to zero. 16.3.2 the serial peripheral interface the serial peripheral interface (spi) allows the mpc801 to exchange data with other chips in the mpc860 family, the mc68360, mc68302, m68hc11, and m68hc05 microcontroller families, as well as a number of peripheral devices. the serial peripheral interface is a full-duplex, synchronous, character-oriented channel that supports a four-wire interface receive, transmit, clock and slave select. the spi block consists of transmitter and receiver sections, an independent baud rate generator, and a control unit. the transmitter and receiver sections use the same clock that is derived from the spi baud rate generator in master mode and generated externally in slave mode. during an spi transfer, data is transmitted and received simultaneously. figure 4-2 below illustrates the serial peripheral interface block diagram. seecom bit 0 1 2 3 4 5 6 7 field rst reserved
serial communication modules 16-16 mpc801 user? manual motorola 16 figure 16-2. spi block diagram the depth of the spi receiver and transmitter fifos is two characters. combined with the shift register, this corresponds to an effective fifo depth of three characters. the mpc801 serial peripheral interface most-significant bit is shifted out first and when the serial peripheral interface is not enabled in the spmode register, it consumes the least amount of power. 16.3.2.1 features . the following is a list of the serial peripheral interface? main features: four-wire interface full-duplex operation 8- and 16-bit data character operation back-to-back character transmission and reception support master or slave spi mode support multimaster environment support clock rate support at a maximum of 6.25mhz in master mode and 12.5mhz in slave mode, assuming a 25mhz system clock transmit fifo receive fifo shift_register counter pins interface spi mode reg serial controller u-bus spi brg spimiso spimosi spiclk in_clk rxd txd brgclk spisel peripheral bus
serial communication modules motorola mpc801 user? manual 16-17 16 independently programmable baud rate generator programmable clock phase and polarity open-drain output pins support multimaster configuration local loopback capability for testing 16.3.2.2 clocking and pin functions. the serial peripheral interface can be configured as a master for the serial channel and generate both the enable and clock signals. it can also be configured as a slave in which both the enable and clock signals are inputs. the serial peripheral interface supports operation in a multimaster environment. when the serial peripheral interface is a master, the spi baud rate generator is used to generate the spi transmit and receive clocks. the spi baud rate generator takes its input from the baud rate generator clock, which is generated in the clock synthesizer of the mpc801. the serial peripheral interface? spimiso pin is an input in master mode and an output in slave mode. the serial peripheral interface? spimosi pin is an output in master mode and an input in slave mode. the reason the pin names change functionality between master and slave mode is to support a multimaster configuration that allows communication from one serial peripheral interface to another with the same hardware configuration. when the serial peripheral interface is a master, spiclk is the clock output pin that shifts in the received data from the spimiso pin and shifts out the transmitted data to the spimosi pin. additionally, an spi master device must provide a slave select signal output to enable the spi slave devices. you can implement this using one of the general-purpose i/o pins. however, the spisel pin should not be asserted while the spi is working as a master or an error will occur. when the serial peripheral interface is a slave, spiclk is the clock input pin that shifts in the received data from the spimosi pin and shifts out the transmitted data to the spimiso pin. the spisel pin provided by the mpc801 is the enable input to the spi slave. when the serial peripheral interface is in a multimaster environment, the spisel pin is still an input and is used to find an error condition when more then one master is operating. spiclk is a gated clock (the clock toggles only while data is being transferred) and four phase/polarity combinations of spiclk are available. you can select any of them using two bits in the spi mode register. the serial peripheral interface pins can also be configured as open-drain pins to support a multimaster configuration where the same pin can either be driven by the mpc801 or an external spi device.
serial communication modules 16-18 mpc801 user? manual motorola 16 16.3.2.3 spi transmission and reception process. since the serial peripheral interface is a character-oriented communication unit, the powerpc core is responsible for packing and unpacking the receive/transmit frames.the core supplies and collects words to or from the serial peripheral interface as requested. the core receives data by reading the spi receive data hold (spird) register. it resets the f bit in the spi event register (spier) to free up the spird register for the next operation. the core transmits data by writing it into the spi transmit data hold (spitd) register when the first or last word is indicated. the spi core handshake protocol can be implemented by using a polling or interrupt mechanism. when using a polling mechanism, the core reads the spier in a predefined frequency and acts according to the value of the spier bits.the polling frequency depends on the spi serial channel frequency. when using an interrupt mechanism, setting either the e or f bits of the spier causes an interrupt to the core. the interrupt level is determined by the spirl bits of the spimr. the core then reads the spier and acts appropriately. there are three basic modes of operation for transmitting and receiving?aster, slave, and multimaster. note once the core realizes that the f and e bits are set, it should treat the receive request first. 16.3.2.3.1 spi master mode. when the serial peripheral interface is in master mode, it transmits a message to the peripheral or spi slave, which replies simultaneously. when the mpc801 works with more than one slave, it can use the general-purpose parallel i/o pins to selectively enable different slaves. to begin the data exchange, the core writes the data to be transmitted into the spitd register. it then sets the str bit in the spcom register to start transmitting data. the spi controller then generates programmable clock pulses on the spiclk pin for each character and shifts the data out on the spimosi pin. at the same time, the serial peripheral interface shifts the received data in from the spimiso pin. during the transmission process, the core is responsible for supplying the data whenever the serial peripheral interface requests it to ensure smooth operation. the str bit should only be set for the first character of any transmission. the serial peripheral interface continues transmitting and receiving characters until the l bit in the spitd register is set or an error occurs. the serial peripheral interface sets the e bit of the spier and issues a maskable interrupt to the system interface unit interrupt controller whenever its transmit buffer is not full. it also sets the e bit after sending the last word. in response, the core should read the exception flags that relate to the last word. the serial peripheral interface sets the f bit of the spier and issues a maskable interrupt to the system interface unit interrupt controller whenever its receive buffer has been filled with data. if the serial peripheral interface is the only master in a system, the spisel pin can be used as a general-purpose i/o and the internal spisel pin to the serial peripheral interface will always be forced inactive internally, thus eliminating the possibility of a multimaster error.
serial communication modules motorola mpc801 user? manual 16-19 16 16.3.2.3.2 spi slave mode. when the serial peripheral interface is in slave mode, it receives messages from an spi master and replies simultaneously. the spisel pin must be asserted before receive clocks will be recognized and once it is asserted, the spiclk pin becomes an input from the master to the slave. the spiclk pin can vary frequency from dc to the brgclk/2 (12.5mhz for a 25mhz system). before the data exchange, the core writes the data to be transmitted into the spitd register. the core should then set the str bit in the spi command (spcom) register to enable the serial peripheral interface to prepare the data for transmission and wait for the spisel pin to be asserted. data is shifted out from the slave on the spimiso pin and shifted in through the spimosi pin. the serial peripheral interface sets the e bit of the spier and issues a maskable interrupt to the system interface unit interrupt controller whenever its transmit buffer is not full. the serial peripheral interface sets the f bit of the spier and issues a maskable interrupt to the system interface unit interrupt controller whenever its receive buffer has been filled with data. the serial peripheral interface then continues receiving data until the spisel pin is negated. transmission continues until no more data is available or the spisel pin is negated. after completing the transmission of characters, the serial peripheral interface transmits ones until the spisel pin is negated. 16.3.2.3.3 multimaster operation. the serial peripheral interface can operate in a multimaster environment in which some spi devices are connected on the same bus. in this configuration, the spimosi, spimiso, and spiclk pins of all serial peripheral interfaces are connected together and the spisel input pins are connected separately. in this environment, only one spi device can work as a master at a time and all the others must be slaves. when the serial peripheral interface is configured as a master and its spisel input pin goes active, a multimaster error occurs because more than one spi device is acting as bus master. the serial peripheral interface sets both me bits in the spier and spird registers. the serial peripheral interface operation and output drivers are also disabled. the core should clear the en bit of the spi mode (spmode) register before using the serial peripheral interface again. after all the issues are addressed, the me bit should be cleared and the serial peripheral interface enabled following the same procedure that is used after a reset.
serial communication modules 16-20 mpc801 user? manual motorola 16 16.3.2.4 programming the serial peripheral interface. 16.3.2.4.1 spi mode register. the read/write spi mode (spmode) register controls both the spi operation mode and clock source. this register is cleared by reset. bits 0 and 5?eserved these bits are reserved and should be set to zero. loop?oop mode when set, this bit selects the local loopback operation. the transmitter output is internally connected to the receiver input; the receiver and transmitter operate normally except that the received data is ignored. 0 = normal operation. 1 = the serial peripheral interface is in loopback mode. ci?lock invert this bit inverts the spi clock polarity (refer to figures 4-3 and 4-4 for details). 0 = the inactive state of spiclk is low. 1 = the inactive state of spiclk is high. cp?lock phase this bit selects one of two fundamentally different transfer formats. 0 = spiclk begins toggling at the middle of the data transfer. 1 = spiclk begins toggling at the beginning of the data transfer. div16?ivide by 16 this bit selects the clock source for the spi baud rate generator when configured as an spi master. in slave mode, the clock source is the spiclk pin. 0 = use the baud rate generator clock as the input to the spi baud rate generator. 1 = use the brgclk/16 as the input to the spi baud rate generator. m/s?aster/slave this bit configures the serial peripheral interface to operate as a master or slave. 0 = the serial peripheral interface is a slave. 1 = the serial peripheral interface is a master. spmode bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field res loop ci cp div16 res m/s en cl reserved pm
serial communication modules motorola mpc801 user? manual 16-21 16 en?nable serial peripheral interface this bit enables serial peripheral interface operation. the spimosi, spimiso, spiclk, and spisel pins should be configured to connect to the serial peripheral interface. when the en bit is cleared, the serial peripheral interface is in a reset state and consumes minimal power, thus the spi baud rate generator is not functioning and the input clock is disabled. 0 = the serial peripheral interface is disabled. 1 = the serial peripheral interface is enabled. note other bits of the spmode register should not be modified while the en bit is set. cl?haracter length this bit specifies character length. 0 = 8 bits long. 1 = 16 bits long. bits 9?1?eserved these bits are reserved and should be set to one. pm?rescale modulus select these four bits specify the divide ratio of the prescale divider in the spi clock generator. the baud rate generator clock is divided by 4 * ([pm0?m3] + 1), thus giving a clock divide ratio of 4 to 64 (64 to 1,024). the clock has a 50% duty cycle. note the spmode register must be written according to its size. no byte-enable mechanism is available. figure 16-3. spi transfer format with cp = 0 spiclk (ci=0) spiclk (ci=1) spimosi (from master) spimiso (from slave) spisel msb lsb msb lsb
serial communication modules 16-22 mpc801 user? manual motorola 16 figure 16-4. spi transfer format with cp = 1 16.3.2.4.2 spi command register. the 8-bit read/write spi command (spcom) register is used to start a serial peripheral interface operation. str?tart transmit when the serial peripheral interface is configured as a master, setting this bit causes the spi controller to start transmitting or receiving data to or from the serial peripheral interface. when the serial peripheral interface is configured as a slave, setting the str bit when the spi is idle or between transfers causes it to load the shift register from the transmit data register and start transmitting as soon as the next spi input clocks and select signal are received. the str bit is automatically cleared after one system clock cycle. bits 1??eserved these bits are reserved and should be set to zero. spcom bit 0 1 2 3 4 5 6 7 field str reserved spiclk (ci=0) spiclk (ci=1) spimosi (from master) spimiso (from slave) spisel msb msb lsb lsb
serial communication modules motorola mpc801 user? manual 16-23 16 16.3.2.4.3 spi transmit data hold register. the 32-bit read/write spi transmit data hold (spitd) register holds the character to be transmitted and f or l indications to the spi channel. the core should set the f bit and prepare the first character of data before activating the spi channel. each time the e bit in the spier is set, the core can write another character of data to the spitd register if there is no error indication in the spier. at the end of the frame the core should set the l bit and prepare the last character of data. bits 0?3?eserved these bits are reserved and should be set to 0. l?ast this bit represents the last character. 0 = this character is not the last character of the frame. 1 = this character is the last character of the frame. f?irst this bit represents the first character. 0 = this character is not the first character of the frame. 1 = this character is the first character of the frame. data?ransmit data this bit represents a character for transmission. note writing to the spitd register clears the e bit from the spier. spitd bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved l f bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field data
serial communication modules 16-24 mpc801 user? manual motorola 16 16.3.2.4.4 spi receive data hold register. the 32-bit read-only spi receive data hold (spird) register is used to receive a character of data or l and ov indications from the spi channel. each time the f bit in the spier is set, the core can read the spird register. v?alid this bit represents valid data. 0 = the data is invalid. only the last indication is valid. 1 = the data is valid. bits 1?2?eserved these bits are reserved and should be set to 0. l?ast this bit represents the last character. 0 = this is not the last character in the frame. 1 = this is the last character in the frame. ov?verrun this bit indicates that a receiver overrun has occurred during reception. me?ulti-master error this bit indicates that the spisel pin was asserted while the serial peripheral interface was operating as a master. it indicates that there is a synchronization problem between multiple masters on the spi bus. data?eceive data this bit represents a character of received data. spird bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field v reserved l ov me bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field data
serial communication modules motorola mpc801 user? manual 16-25 16 16.3.2.4.5 spi event register. the 8-bit read/write spi event register (spier) is used to generate interrupts and report events recognized by the serial peripheral interface. when an event is recognized, the serial peripheral interface sets the corresponding bit in the spier. interrupts are only generated by this register for e or f events and can be masked in the spimr. a bit is cleared by writing a 1 (writing a zero has no effect) and more than one bit can be cleared at a time. this register resets to $01. bits 0??eserved these bits are reserved and should be set to zero. un?nderrun this bit indicates that the serial peripheral interface has encountered a transmitter underrun condition while transmitting the associated data buffer. this error condition is only valid when the serial peripheral interface is configured as a slave. me?ultimaster error this bit indicates that the spisel pin was asserted while the serial peripheral interface was operating as a master. this indicates that there is a synchronization problem between multiple masters on the spi bus. f?ull since the spird register is the bottom of the receive fifo, an empty spird indicates the receive fifo is empty. 0 = the spird register is empty. 1 = the spird register has been filled with received data and indications about v, l, and ov. the core is free to read the content of the receive data hold register. the f bit should be cleared to enable the reception of another character. e?mpty since the spitd register is the top of the transmit fifo, a full spitd indicates that the transmit fifo is full. 0 = the spitd register is full. 1 = the spitd register is empty. the core is free to write to the transmit data hold register. the e bit should be cleared to enable the transmission of another character (writing to the spitd register clears the e bit of the spier). spier bit 0 1 2 3 4 5 6 7 field reserved un me f e
serial communication modules 16-26 mpc801 user? manual motorola 16 16.3.2.4.6 spi mask & interrupt level register. the 8-bit read/write spi mask & interrupt level register (spimr) contains the mask for the f and e bits in the spier and the priority request level of the interrupt. if the mask bit in the spimr is 1, the corresponding interrupt in the spier is enabled. if the proper mask bit is zero, the corresponding interrupt in the spier is masked. this register is cleared at reset. bits 0??eserved these bits are reserved and should be set to zero. spirl?pi interrupt request level this field contains the priority request level of the interrupt request level 0-7. f?ull mask if this bit is set to 1, the corresponding interrupt in the spier register is enabled. if it is zero, the corresponding interrupt is masked. e?mpty mask if this bit is set to 1, the corresponding interrupt in the spier register is enabled. if it is zero, the corresponding interrupt is masked. 16.3.3 the i 2 c controller the inter-integrated circuit (i 2 c) controller allows the mpc801 to exchange data with other i 2 c devices such as microcontrollers, eeproms, real-time clock devices, a/d converters, and lcds. the i 2 c controller is a synchronous, multimaster bus that is used to connect several integrated circuits on a board. it uses two wires?erial data and serial clock?o carry information between the integrated circuits connected to the bus. the i 2 c controller consists of transmitter and receiver sections, an independent baud rate generator, and a control unit. the transmitter and receiver sections use the same clock, which is derived from the i 2 c controller baud rate generator in master mode and generated externally in slave mode. the mpc801 i 2 c most-significant bit is shifted out first. when the i 2 c is not enabled in the i2mod register, it consumes minimal power. figure 4-5 illustrates the i 2 c controller block diagram. spimr bit 0 1 2 3 4 5 6 7 field reserved spirl f e
serial communication modules motorola mpc801 user? manual 16-27 16 figure 16-5. i 2 c controller block diagram note the i 2 c receiver and transmitter fifos are two characters deep. combined with the shift register, this creates an effective fifo depth of three characters. 16.3.3.1 features. the following is a list of the i 2 c controller? main features: two-wire interface full-duplex operation master or slave i 2 c mode support multimaster environment support clock rate support at a maximum of 520khz, assuming a 25mhz system clock independent programmable baud rate generator open-drain output pins support multimaster configuration local loopback capability for testing shift register tx data register shift register rx data register mode register baud rate control peripheral bus sda scl serial controller u_bus generator
serial communication modules 16-28 mpc801 user? manual motorola 16 16.3.3.2 clocking and pin functions . the i 2 c controller can be configured as a master for the serial channel to generate the clock signal and initiate and terminate the transfer. as a slave, it can be configured so that the clock signal is an input to the i 2 c controller. when the i 2 c controller is a master, the i 2 c baud rate generator is used to generate the transmit and receive clocks. the i 2 c baud rate generator takes its input from the baud rate generator clock, which is generated in the clock synthesizer of the mpc801. the bidirectional serial data (sda) and serial clock (scl) pins are connected to a positive supply voltage via an external pull-up resistor. when the bus is free, both lines are high. when the i 2 c controller is a master, the scl pin is the clock output signal that shifts in the received data and shifts out the transmitted data from or to the sda pin. additionally, the transmitter arbitrates for the bus during the transmission and aborts it if it loses arbitration. when the i 2 c controller is a slave, the scl pin is the clock input signal that shifts in the received data and shifts out the transmitted data from or to the sda pin. 16.3.3.3 i 2 c controller transmission and reception process. since the i 2 c is a character-oriented communication unit, the core is responsible for packing and unpacking the receive/transmit frames. the core supplies and collects words to or from the i 2 c as requested. the core receives data by reading the i2crd register. it resets the f bit in the i2cer to free the i2crd register for the next operation. the core transmits data by writing it into the i2ctd register when a first or last word indication occurs. the i 2 c core handshake protocol can be implemented using a polling or interrupt mechanism. with a polling mechanism, the core reads the i2cer in a predefined frequency and acts according to the value of the i2cer bits. the polling frequency depends on the spi serial channel frequency. when an interrupt mechanism is used, setting either the e or f bits of the i2cer causes an interrupt to the core. the interrupt level is determined by the i2crl bits of the i2cmr.the core then reads the i2cer and acts appropriately. there are two basic modes of i 2 c operation?aster and slave mode. 16.3.3.3.1 i 2 c master mode. when the i 2 c controller functions in master mode, the i 2 c master initiates a transaction by transmitting a message to the peripheral or i 2 c slave. this message specifies a read or write operation. if it is a read operation, the direction of the transfer is changed at the moment of the first acknowledgment and the slave receiver becomes a slave transmitter. to begin the data exchange, the core writes the data to be transmitted into the i2ctd register and sets the str and m/s bits in the i2com register to start transmitting. the i 2 c master begins transmitting once the shift register is loaded with data and the i 2 c bus is not busy. the i 2 c controller generates a start condition on the sda and scl pins and, at the same time, a programmable clock pulses on the scl pin for each data bit shifted out on the sda pin. for each bit shifted out, the transmitter monitors the level of the sda pin to detect a possible collision with other i 2 c master transmitters. if a collision is detected (the data bit transmitted was 1, but the sda pin was 0), the transmission is aborted and the channel reverts to slave mode. a maskable interrupt is generated to the core to enable the software to try retransmitting later. after each byte, the master transmitter monitors the acknowledgment indication. if the receiver fails to acknowledge a byte, the transmission is aborted and the stop condition is generated by the master.
serial communication modules motorola mpc801 user? manual 16-29 16 the i 2 c sets the e bit of the i2cer and issues a maskable interrupt to the system interface unit interrupt controller whenever its transmit buffer is not full. the i 2 c also sets the e bit after sending the last word. in response, the core should read the exception flags that relate to the last word. when a master i 2 c read operation is to be performed, the core should supply the i 2 c with a first byte that contains the slave? address with the r/w bit set. the master i 2 c determines the length of the incoming massage. the core continues to supply data to the i 2 c master? transmitter, but the following data bytes are ignored by the i 2 c controller and the transmission procedure is performed without actual transmission occurring. that is, until it encounters a byte containing the l bit. when this byte is encountered, the transmission procedure is performed and the reception process ends. the receiver starts reception after it finds the start condition on the sda and scl pins.the i 2 c notifies the core by setting the f bit in the i2cer.the core is responsible for emptying the buffer for the next data. this process continues until a new start or stop condition is detected. if a mismatch is found, the receiver stops receiving and searches again for a new start condition. the receiver acknowledges each data byte as long as an overrun condition does not occur. 16.3.3.3.2 i 2 c slave mode. when the i 2 c controller is in slave mode, it receives messages from an i 2 c master and replies to them. once a slave mode operation is selected in the i2mod register, the scl pin becomes an input from the master to the slave. the scl pin may vary from dc to the brgclk/48 (520khz for a 25mhz system). before data is exchanged, the core writes the data to be transmitted into the i2ctd register. the core then clears the m/s bits and sets the str bit in the i2com register to enable the i 2 c controller to prepare the data for transmission and wait for a read request from the master. when a match is detected between the first byte received after a start condition and the slave address, the r/w bit is checked. if a write operation was requested by the master (r/w =0), the data received is acknowledged and written into a receive fifo. a maskable interrupt is issued when a character is fully received. this process continues until the last character has been sent or an error has occurred. the powerpc master is responsible for emptying the buffer to ensure smooth operation. if a read operation was requested by the i 2 c master (r/w =1), the recently received address byte is only acknowledged if the transmitter fifo has been loaded by the core. if the transmitter is ready, transmission starts on the next clock pulse after the acknowledgment. otherwise, the transaction is aborted and the un bit in the i2cer is set to notify the software to prepare data for transmission on the next attempt. if an underrun condition occurred, the slave transmits ones until a stop condition is detected. after each byte, the transmitter checks the acknowledge bit. if the master receiver fails to acknowledge a byte transmission is aborted and the nak bit in the i2cer is set. data is shifted out from the slave on the sda pin.
serial communication modules 16-30 mpc801 user? manual motorola 16 16.3.3.4 programming the i 2 c controller 16.3.3.4.1 i 2 c mode register. the read/write i 2 c mode (i2mod) register controls i 2 c operation mode and the i 2 c clock source. it is cleared by reset. bit 0??eserved these bits are reserved and should be set to zero. gcd?eneral call disable this bit determines if the receiver acknowledges a general call address. 0 = general call address is enabled. 1 = general call address is disabled. flt?lock filter this bit determines if the i 2 c input clock is filtered to prevent spikes in a noisy environment. 0 = i2clk is not filtered. 1 = i2clk is filtered by a digital filter. pdiv?re divider this bit determines the division factor of the clock before it is fed into the baud rate generator. the clock source for the i 2 c is the baud rate generator clock that is generated by the mpc801 clock synthesizer. 00 = use the brgclk/32 as the input to the i 2 c baud rate generator. 01 = use the brgclk/16 as the input to the i 2 c baud rate generator. 10 = use the brgclk/8 as the input to the i 2 c baud rate generator. 11 = use the brgclk/4 as the input to the i 2 c baud rate generator. en?nable i 2 c this bit enables i 2 c operation. when it is cleared, the i 2 c is in a reset state and consumes minimal power. the i 2 c baud rate generator is not functioning and the input clock is disabled. other bits of the i2mod register should not be modified while the en bit is set. 0 = i 2 c is disabled. 1 = i 2 c is enabled. i2mod bit 0 1 2 3 4 5 6 7 field reserved gcd flt pdiv en
serial communication modules motorola mpc801 user? manual 16-31 16 16.3.3.4.2 i 2 c address register. the 8-bit, memory-mapped, read/write i 2 c address (i2add) register holds the address for this i 2 c port. sad slave address this field holds the slave address for the i 2 c port. bit 7?eserved this bit is reserved and should be set to 0. 16.3.3.4.3 i 2 c brg register. the 8-bit, memory-mapped, read/write i 2 c brg (i2brg) register sets the divide ratio of the baud rate generator. this register is set to all ones at hard reset. div division ratio these bits specify the divide ratio of the baud rate generator divider in the i 2 c clock generator. the output of the prescaler is divided by 2 * ([div0?iv7] + 3 + 2*flt). the clock has a 50% duty cycle. the minimum value for each div bit is 3 if the digital filter is disabled and 6 if it is enabled. 16.3.3.4.4 i 2 c command register. the 8-bit read/write i 2 c command (i2com) register is used to start an i 2 c operation. str?tart transmit when the i 2 c is configured as a master, setting this bit to 1 causes the i 2 c controller to start the transmission of data from the i 2 c transmit buffers if you have configured them as ready. when the i 2 c is configured as a slave, setting the str bit to 1 when the i 2 c is idle or between transfers causes the i 2 c to load the shift register from the i 2 c transmit buffer and start transmitting when an address byte is received that matches the slave address, with the r/w bit is set. the str bit is always read as a zero. i2add bit 0 1 2 3 4 5 6 7 field sad reserved i2brg bit 0 1 2 3 4 5 6 7 field div i2com bit 0 1 2 3 4 5 6 7 field str reserved m/s
serial communication modules 16-32 mpc801 user? manual motorola 16 bits 1??eserved these bits are reserved and should be set to zero. m/s?aster/slave this bit configures the i 2 c to operate as a master or slave. 0 = i 2 c is a slave. 1 = i 2 c is a master. 16.3.3.4.5 i 2 c transmit data hold register. the 16-bit read/write i 2 c transmit data hold (i2ctd) register holds the character to be transmitted and the f or l indications to the i 2 c channel. the core should set the f bit and prepare the first character of data before activating the i 2 c channel. each time the e bit in the i2cer is set the core can write another character of data to the i2ctd register, as long as there is no error indication in the i2cer. at the end of the frame, the core should set the l bit. bits 0??eserved these bits are reserved and should be set to 0. l?ast this bit represents the last character. 0 = this character is not the last character of the frame. 1 = this character is the last character of the frame. f?irst this bit represents the first character. 0 = this character is not the first character of the frame. 1 = this character is the first character of the frame. data?ransmit data this bit represents a character for transmission. note writing to the i2ctd register clears the e bit in the i2cer. i2ctd bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved l f data
serial communication modules motorola mpc801 user? manual 16-33 16 16.3.3.4.6 i 2 c receive data hold register. the 16-bit read-only i 2 c receive data hold (i2crd) register is used to receive a character of data and indications of the l and ov bits from the i 2 c channel. each time the f bit in the i2cer is set, the core can read this register. bits 0??eserved these bits are reserved and should be set to 0. v?alid this bit represents valid data. 0 = the data is invalid. only the last indication is valid. 1 = the data is valid. l?ast this bit represents the last character in the frame. 0 = this is not the last character in the frame. 1 = this is the last character in the frame. ov?verrun this bit indicates that a receiver overrun has occurred during reception. data?eceive data this bit represents a character of received data. 16.3.3.4.7 i 2 c event register. the 8-bit read-only i 2 c event register (i2cer) is used to generate interrupts and report events recognized by the i 2 c channel. when an event is recognized, the i 2 c controller sets its corresponding bit in the i2cer. an interrupt can be generated by the f or e bits and can be masked by the i2cmr. a bit is cleared by writing a 1 (writing a zero has no effect). more than one bit can be cleared at a time. this register resets to $01. bits 0??eserved these bits are reserved and should be set to 0. i2crd bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field reserved l ov data i2cer bit 0 1 2 3 4 5 6 7 field reserved nak un cl f e
serial communication modules 16-34 mpc801 user? manual motorola 16 nak?o acknowledge this bit indicates that a transmission was aborted because the last byte transmitted was not acknowledged. un?nderrun this bit indicates that the i 2 c has encountered a transmitter underrun condition while transmitting the associated data buffer. cl?ollision this bit indicates that a transmission was aborted because the transmitter lost arbitration for the bus. f?ull since the i2crd register is the bottom of the receive fifo, an empty i2crd indicates that the receive fifo is empty. 0 = the i2crd register is empty. 1 = the i2crd register has been filled with received data and indications about the v, l, and ov bits. the core is free to read the contents of the i2crd register. however, the f bit should be cleared to receive another character. e?mpty since the i2ctd register is the top of the transmit fifo, a full i2ctd indicates that the transmit fifo is full. 0 = the i2ctd register is full. 1 = the i2ctd register is empty. the core is free to write to the i2ctd register. however, the e bit should be cleared to receive another character. the i2ctd register write clears the e bit of the i2cer. 16.3.3.4.8 i 2 c mask & interrupt level register. the 8-bit read/write i 2 c mask & interrupt level register (i2cmr) contains the mask for the f and e bits in the i2cer and the priority request level of the interrupt. if the proper mask bit in the i2cmr is 1, the corresponding interrupt in the i2cer is enabled, but if it is zero, the interrupt is masked. this register is cleared at reset. bits 0??eserved these bits are reserved and should be set to 0. i2crl? 2 c interrupt request level this bit contains the priority request level of the interrupt sent from the i 2 c controller to the interrupt request level 0-7. i2cmr bit 0 1 2 3 4 5 6 7 field reserved i2crl f e
serial communication modules motorola mpc801 user? manual 16-35 16 f?ull mask if this bit is set to 1, the corresponding interrupt in the i2cer is enabled. if it is zero, the interrupt is masked. e?mpty mask if this bit is set to 1, the corresponding interrupt in the i2cer is enabled. if it is zero, the interrupt is masked. 16.4 the parallel i/o port the mpc801 supports a general-purpose i/o port. each pin in the i/o port can be configured as a general-purpose i/o pin or a dedicated peripheral interface pin. port b is shared with the serial peripheral interface, i 2 c, and the uart1 and uart2 pins. each pin can be configured as an input or output and has a latch for data output. they can be read or written to at any time. port b pins can be configured as open-drain (configured in a wired-or configuration) on the board. the pin drives a zero voltage, but three-states when driving a high voltage. note the port pins do not have internal pull-up resistors. 16.4.1 features the following is a list of the parallel i/o port? main features: 16 bits wide open-drain capability all pins are bidirectional, have alternate on-chip peripheral functions, and three-stated at system reset. pin values are readable while the pin is connected to an on-chip peripheral 16.4.2 port b pin functions port b pins are independently configured as general-purpose i/o pins if the corresponding bit in the port b pin assignment register (pbpar) is cleared. they are configured as dedicated on-chip peripheral pins if the corresponding pbpar and pbdir bits are set. when acting as a general-purpose i/o pin, the signal direction for that pin is determined by the corresponding control bit in the port b data direction (pbdir) register. the port i/o pin is configured as an input if the corresponding pbdir bit is cleared or as an output if the corresponding pbdir bit is set. all pbpar and pbdir bits are cleared at the time of total system reset and all port b pins are configured as general-purpose input pins.
serial communication modules 16-36 mpc801 user? manual motorola 16 if a port b pin is selected as a general-purpose i/o pin, it can be accessed through the port b data (pbdat) register. data written to the pbdat is stored in an output latch. if a port b pin is configured as an output, the output latch data is gated onto the port pin. in this case, when the pbdat register is read, the port pin itself is read. if a port b pin is configured as an input, data written to the pbdat register is still stored in the output latch, but is prevented from reaching the port pin. in this case, when the pbdat register is read, the state of the port pin is read. all of the port b pins have more than one option, including on-chip peripheral functions related to the serial peripheral interface, i 2 c, uart1, and uart2. table 4-2 provides a description of the available port b pin options. note setting the pbpar bit without setting the corresponding pbdir bit causes a programming error. table 16-2. port b pin assignment pin function signal pbpar = 0 pbpar=1 & pbdir=1 input to on-chip peripheral pb31 port b31 spisel vdd pb30 port b30 spiclk gnd pb29 port b29 spimosi vdd pb28 port b28 spimiso spimiso = spimosi pb27 port b27 i2csda vdd pb26 port b26 i2cscl gnd pb25 port b25 ugpio1 vdd pb24 port b24 ugpio2 vdd pb23 port b23 ucts1 gnd pb22 port b22 ucts2 gnd pb21 port b21 urxd1 vdd pb20 port b20 urxd2 vdd pb19 port b19 urts1 pb18 port b18 urts2 pb17 port b17 utxd1 pb16 port b16 utxd2
serial communication modules motorola mpc801 user? manual 16-37 16 16.4.3 the port b registers port b has four 16-bit memory-mapped read/write control registers that must all be written according to their size. no byte-enable mechanism is available. 16.4.3.1 port b open-drain register. the port b open-drain (pbodr) register indicates a normal or wired-or configuration of the port pins. this register is cleared at system reset. od16?d31?river type each pin in port b has a dedicated control bit that selects the driver type. it must decide between an active or open-drain driver. 0 = the i/o pin is actively driven as an output. 1 = the i/o pin is an open-drain driver. as an output, the pin is actively driven low. otherwise, it is three-stated. 16.4.3.2 port b data register. a read of the port b data (pbdat) register returns the data to the pin, regardless of whether the pin is defined as an input or output. this allows the pin to detect output conflicts by comparing the written data with the data on the pin. a write to the pbdat register is latched and if that bit in the pbdir register is configured as an output, the value latched for that bit is driven to its respective pin. this register can be read or written to at any time. it is not initialized, but is undefined at reset. d16?31?ata each bit in the register reflects the pin value, regardless of whether the pin is an input or output. pbodr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field od16 od17 od18 od19 od20 od21 od22 od23 od24 od25 od26 od27 od28 od29 od30 od31 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pbdat bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
serial communication modules 16-38 mpc801 user? manual motorola 16 16.4.3.3 port b data direction register. the port b data direction (pbdir) register is cleared at system reset. dr16?r31?ata direction each pin can be defined as an input or output pin. 0 = the corresponding pin is an input. 1 = the corresponding pin is an output. 16.4.3.4 port b pin assignment register. the port b pin assignment register (pbpar) is cleared at system reset. dd16?d31 0 = general-purpose i/o. the peripheral functions of the pin are not used. 1 = dedicated peripheral function. the pin is used by the internal module and the on-chip peripheral function to which it is dedicated can be determined by other bits. pbdir bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field dr16 dr17 dr18 dr19 dr20 dr21 dr22 dr23 dr24 dr25 dr26 dr27 dr28 dr29 dr30 dr31 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pbpar bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field dd16 dd17 dd18 dd19 dd20 dd21 dd22 dd23 dd24 dd25 dd26 dd27 dd28 dd29 dd30 dd31 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
motorola mpc801 user? manual 17-1 17 section 17 data alignment for referencing purposes, this section serves as a placeholder to keep the sequence of other sections the same as they appear in other manuals.
data alignment 17-2 mpc801 user? manual motorola 17
motorola mpc801 user? manual 18-1 18 section 18 development support emulators require a level of control and observation that are in sharp contrast to the trend of modern microcomputers and microprocessors in which many bus cycles are directed to internal resources and are not externally visible. the same is true for bus analyzers. to enhance support for development tools, some of the development support functions are implemented in the silicon. the following features allow you to efficiently debug systems based on the mpc801. program flow tracking internal watchpoint and breakpoint generation emulation systems that control core (debug mode) activity 18.1 program flow tracking the mpc801 provides many options for tracking program flows that impact performance in varying degrees. the information provided while tracking code flow can be compressed and captured externally and then parsed by a post-processing program using the microarchitecture defined here. the program instruction flow is visible on the external bus when the mpc801 is programmed to operate in serialized mode and show all fetch cycles on the external bus. when working in this mode, although tracking of the program instruction flow is simpler, the performance of the mpc801 is much lower than when working in regular mode. for more details about programming the core to operate in this mode, see table 18-18. the mpc801 implements a prefetch queue combined with parallel, out of order, and pipelined execution. these features, plus the fact that most fetch cycles are performed internally from the instruction cache, increases performance but makes it very difficult to provide real program trace. instructions progress inside the core from fetch to retirement. an instruction retires from the machine only after it and all preceding instructions finish executing with no exception. therefore, only retired instructions can be considered a rchitecturally executed.
development support 18-2 mpc801 user? manual motorola 18 to reconstruct program trace, the program code combined with additional mpc801 information is required. reporting program trace during retirement significantly complicates visibility and increases the die size for two reasons?ore than one instruction can retire in a clock cycle and it is harder to report on indirect branches during retirement. because of this, program trace is reported during fetch and helps to reconstruct the instructions that actually retire after fetch canceled instructions are reported. instructions are fetched sequentially until branches (direct or indirect), exceptions, or interrupts appear in the program flow or until a stall in execution forces the machine to avoid fetching the next address. these instructions may be architecturally executed or they may be canceled in any stage of the machine pipeline. therefore, the additional information includes: a description of the last fetched instruction (stall, sequential, branch not taken, branch direct taken, branch indirect taken, interrupt/exception taken). the addresses of all indirect flow changes targets. indirect flow changes include all branches using the link and count registers as the target address, all interrupts/exceptions, as well as rfi and mtmsr because it may cause context switch. the number of instructions canceled on each clock. the following sections define how this information is generated and how it should be used to reconstruct the program trace. the issue of data compression that could reduce the amount of memory needed by the debug system is also mentioned. 18.1.1 basic operation 18.1.1.1 the internal hardware to make the events that occur in the machine visible, a few dedicated pins are used. also, a special bus cycle attribute called program trace cycle is defined. the program trace cycle attribute is attached to all fetch cycles resulting from indirect flow changes. when program trace recording is required, you must ensure that these cycles are visible on the external bus. the vsync signal, when asserted, forces all fetch cycles marked with the program trace cycle attribute to be visible on the external bus, even if their data is found in one of the internal devices. to enable the external hardware to properly synchronize with the internal activity of the core, the assertion and negation of vsync forces the machine to synchronize and the first fetch after this synchronization to be marked as a program trace cycle and be seen on the external bus. for more information on the activity of the external hardware during program trace, refer to section 18.1.1.5 the external hardware .
development support motorola mpc801 user? manual 18-3 18 note to keep the pin count of the chip as low as possible, the vsync signal is not implemented as one of the chip? external pins. instead, it is asserted and negated using the serial interface implemented in the development port. for more information on this interface, refer to section 18.3.3 the development port . forcing the core to show all fetch cycles marked with the program trace cycle attribute can be accomplished by either asserting the vsync signal (as mentioned above) or by programming the fetch show cycle bits in the instruction support control register (ictrl). for more information refer to section 18.1.2 controlling the instruction fetch show cycle . when the vsync signal is asserted, all fetch cycles marked with the program trace cycle attribute become visible on the external bus. these cycles generate regular bus cycles when the instructions reside in one of the external devices or generate address-only cycles when the instructions are in one of the internal devices. when vsync is asserted, some performance degradation occurs because of the additional external bus cycles. since this performance degradation is expected to be very small, it is possible to program the machine to show all indirect flow changes, perform these additional external bus cycles, and maintain the same behavior when vsync is asserted and negated. for more information see table 18-18. the status pins are divided into two groups: vf [0 . . 2] instruction queue status?enotes the type of the last fetched instruction or how many instructions were flushed from the instruction queue. these status pins are used for both functions because queue flushes only happen in clocks where there is no fetch type information to be reported. see table 18-1 for the definition of possible instruction types. possible instruction queue flushes: 000?one 001? instruction was flushed from the instruction queue 010? instructions were flushed from the instruction queue 011? instructions were flushed from the instruction queue 100? instructions were flushed from the instruction queue 101? instructions were flushed from the instruction queue 110?eserved 111?ike vf = ?11
development support 18-4 mpc801 user? manual motorola 18 vfls [0 . . 1] history buffer flushes status?ndicates the number of instructions that are flushed from the history buffer on this clock. possible values are: 00 ? none 01 ? 1 instruction was flushed from the history buffer 10 ? 2 instructions were flushed from the history buffer 11 ? used for debug mode indication and should be ignored by the program trace external hardware. for details, refer to section 18.3.2 debug mode . 18.1.1.2 special case of queue flush information there is one special case where the queue flush information is expected on the vf pins. this is easily monitored since the only case where this can happen is when vf =111 and the maximum number of possible queue flushes is five. table 18-1. vf pin encoding vf instruction type vf next clock will hold 000 none more instruction type information 001 sequential 010 branch (direct or indirect) not taken 011 vsync was asserted/negated and therefore the next instruction will be marked with the program trace cycle attribute 100 interrupt/exception taken, the target will be marked with the program trace cycle attribute queue flush information 2 101 branch indirect taken, rfi, mtmsr, isync and in some cases mtspr, the target will be marked with the program trace cycle attribute 1 110 branch direct taken 111 branch (direct or indirect) not taken notes: 1. refer to section 18.1.1.4 sequential instructions marked as indirect branch . 2. unless the next clock vf = 111, refer to section 18.1.1.2 special case of queue flush information .
development support motorola mpc801 user? manual 18-5 18 18.1.1.3 program trace in debug mode when entering debug mode an interrupt/exception taken is reported on the vf pins (vf=?00? and a cycle marked with the program trace cycle is externally visible. when the core is in debug mode, the vf pins equal ?00?and the vfls pins equal ?1? for more information on the mpc801 debug mode, refer to section 18.3 development system interface . if the vsync signal is asserted or negated while the cpu is in debug mode, this information is announced when the first vf pins report as the cpu returns to regular mode. if vsync was not changed while in debug mode, the first vf pins report will be encoded as vf=?01? (indirect branch) due to the rfi instruction being issued. in both cases, the first instruction fetch after debug mode is marked with the program trace cycle attribute and is externally visible. 18.1.1.4 sequential instructions marked as indirect branch there are instances in which nonbranch (sequential) instructions affect the machine like indirect branch instructions affect it. these instructions include the rfi , mtmsr , isync , and mtspr instructions to the cmpa-f, ictrl, icr, and der registers. the core marks these instructions as indirect branch instructions (vf = ?01? and the following instruction address is marked with the program trace cycle attribute, as if it was an indirect branch target. therefore, when one of these special instructions is detected in the core, the address of the following instruction is externally visible. the reconstructing software is now able to correctly evaluate the effect of these instructions. 18.1.1.5 the external hardware when program trace is needed, the external hardware must sample the status pins (vf and vfls) of every clock and mark the address of all cycles with the program trace cycle attribute. program trace is used in various ways, but back trace and window trace are the most common methods. 18.1.1.5.1 back trace. this is useful when a record of the program trace is needed before an event like system failure occurs. if back trace is required, the external hardware should start sampling the vf and vfls pins and the addresses of all cycles marked with the program trace cycle attribute immediately after reset is negated. since the instruction show cycles programming defaults to ?how all?out of reset, all cycles marked with the program trace cycle attribute are visible on the external bus. vsync should be asserted sometime after reset and negated when the actual event occurs. if ?how all?is not preferable for the instruction show cycles prior to the occurrence of the actual event, vsync must be asserted before the changing instruction show cycles programming from ?how all? notice that if the timing of the event in question is unknown, it is possible to use cyclical buffers. after the vsync signal is negated, the trace buffer contains the program flow trace of the program that was executed before the event in question occurred. 18.1.1.5.2 window trace. this is useful when a record of the program trace between two events is required. the vsync signal should be asserted between these two events. after vsync is negated, the trace buffer will contain information describing the program trace of the program that was executed between the two events.
development support 18-6 mpc801 user? manual motorola 18 18.1.1.5.3 synchronizing the trace window to the internal core events. the assertion and negation of the vsync signal is accomplished using the serial interface implemented in the development port. to synchronize the assertion and negation of vsync to an internal core event, the internal breakpoints hardware should be used with the debug mode. this method is available only when debug mode is enabled. for more information on debug mode, refer to section 18.3 development system interface . to synchronize the trace window to the internal core events, follow these steps: 1. enter debug mode either immediately out of reset of using the debug mode request. 2. using the control registers defined in section 18.2 watchpoint and breakpoint generation , program the hardware to break on the event that marks the start of the trace window. 3. enable debug mode entry for the programmed breakpoint in the debug enable register (see table 18-18). 4. return to the regular code run. 5. the hardware generates a breakpoint when the event in question is detected and the machine enters debug mode. 6. program the hardware to break on the event that marks the end of the trace window. 7. assert the vsync signal. 8. return to the regular code run. the first report on the vf pins is vsync, where vf =?11? 9. the external hardware starts sampling the program trace information after the vf pins indicate vsync. 10. the hardware generates a breakpoint when the event in question is detected and the machine enters debug mode. 11. negate vsync. 12. return to the regular code run (issue an rfi ). the first encoding on the vf pins is vsync, where vf =?11? 13. the external hardware stops sampling the program trace information after recognizing vsync on the vf pins. 18.1.1.5.4 detecting the trace window start address. when using back trace, latching vf, vfls, and the address of the cycles marked program trace cycle should all start immediately after reset is negated. the start address is the first address in the program trace cycle buffer. when using window trace, latching vf, vfls, and the address of the cycles marked as program trace cycle should all start immediately after the first vsync signal is recognized on the vf pins. the start address of the trace window should be calculated according to the first two vf pin reports. assume vf1 and vf2 are the first two vf pin reports and t1 and t2 are the two addresses of the first two cycles marked with the program trace cycle attribute that were latched in the trace buffer. the following table should be used to calculate the trace window start address.
development support motorola mpc801 user? manual 18-7 18 18.1.1.5.5 detecting vsync assertion and negation. since the vf pins are used for reporting both instruction type and queue flush information, the external hardware must take special care when trying to detect the assertion/negation of vsync. when vf = ?11? it is a vsync assertion/negation report only if the prior value of vf was ?00? ?01? or ?10? 18.1.1.5.6 detecting the trace window end address. the information on the status pins that describes the last fetched instruction and last queue/history buffer flush changes every clock. cycles marked as program trace cycle are generated on the external bus only when the system interface unit arbitrates over the external bus. therefore, there is a delay between the time a cycle marked as program trace cycle is performed and the actual time that the cycle is detected on the external bus. when you negate vsync using the serial interface of the development port, the core delays reporting that vsync occurred on the vf pins until all addresses marked with the program trace cycle attribute are externally visible. therefore, the external hardware should stop sampling vf, vfls, and the address of the cycles marked as program trace cycle immediately after vf = vsync. the last two instructions reported on the vf pins are not always valid. therefore, at the last stage of the reconstruction software, the last two instructions should be ignored. 18.1.1.6 benefits of compression to store all the information generated on the pins during program trace (5 bits per clock + 30 bits per show cycle), a large memory buffer is required. however, since this information includes events that were canceled, compression is possible and can be very beneficial in this situation. external hardware can be added to eliminate all canceled instructions and reports only on taken/not taken branches, indirect flow change, and the number of sequential instructions after the last ?w change. table 18-2. detecting the trace buffer starting point vf1 vf2 starting point description 011 vsync 001 sequential t1 vsync asserted. followed by a sequential instruction. the start address is t1. 011 vsync 110 branch direct taken t1 - 4 + offset(t1 - 4) vsync asserted. followed by a taken direct branch. the start address is the target of the direct branch. 011 vsync 101 branch indirect taken t2 vsync asserted. followed by a taken indirect branch. the start address is the target of the indirect branch.
development support 18-8 mpc801 user? manual motorola 18 18.1.2 controlling the instruction fetch show cycle instruction fetch show cycles are controlled by the bits in the ictrl register and the state of the vsync signal. the following table defines the level of fetch show cycles generated by the core. for information on the fetch show cycle control bits, see table 18-3. a cycle marked with the program trace cycle attribute is generated for any change in the vsync state. 18.2 watchpoint and breakpoint generation when they are detected, watchpoints are reported to the external world (on dedicated pins), but do not change the timing and flow of the machine. when breakpoints are detected, they force the machine to branch to the appropriate exception handler. the core supports watchpoints that are generated inside the core as well as breakpoints that are generated inside and outside the core. internal watchpoints are generated when a user-programmable set of conditions are met. internal breakpoints can be programmed to be generated either when one of the internal watchpoints is asserted or after an internal watchpoint is asserted for user-programmable times. programming a certain internal watchpoint to generate an internal breakpoint can be done either in the software, by setting the corresponding software trap enable bit, or on-the-fly using the serial interface of the development port to set the corresponding trap enable bit. external breakpoints can be generated by any of the system peripherals, including those found on or outside the mpc801 or those found by an external development system. peripherals on the external bus use the serial interface of the development port to assert an external breakpoint. table 18-3. fetch show cycle control vsync isctl (29:31) instruction fetch show cycle control bits show cycles generated x 000 all fetch cycles x x01 all change of flow (direct and indirect) x x10 all indirect change of flow 0 x11 no show cycles are performed 1 x11 all indirect change of flow note: when ictrl(29:31) is set to 010 or 110, the sts functionality of the op2/modck1/sts pin must be enabled by writing 10 or 11 to the dbgc ?ld of the siumcr. the address on the external bus should only be sampled when sts is asserted.
development support motorola mpc801 user? manual 18-9 18 in the core, as in other microprocessors, saving and restoring the machine state on the stack during exception handling is done in the software. when the software is in the middle of saving or restoring, the msr ri bit is cleared. exceptions that occur are handled by the core when the msr ri bit is clear and they result in a nonrestartable machine state. for more information refer to section 6.2.4.1 restartability after an interrupt . in general, breakpoints are recognized in the core only when the msr ri bit is set, which guarantees machine restartability after a breakpoint. in this working mode, breakpoints are masked. there are times when it is preferable to enable breakpoints even when the msr ri bit is clear, even though there is the risk of causing a nonrestartable machine state. in programmable nonmasked mode, an external development system can choose to assert a nonmaskable external breakpoint. watchpoints are not masked and are always reported on the external pins, regardless of the value of the msr ri bit. the counters, although they are counting watchpoints, are part of the internal breakpoints logic and are not decremented when the core is in masked mode and the msr ri bit is clear. figure 18-1 illustrates the watchpoint and breakpoint support of the core. 18.2.1 internal watchpoints and breakpoints this section describes the internal breakpoints and watchpoints support of the core. for more information on external breakpoints support, refer to section 18.3 development system interface . internal breakpoint and watchpoint support is based on: eight comparators that compare information on instruction and load/store cycles two counters two and-or logic structures the comparators perform a comparison on the instruction address (i-address), load/store address (l-address), and load/store data (l-data). the comparators can detect the following conditions: equal to not equal to greater than less than greater-than-or-equal-to and less-than-or-equal-to are easily obtained from these four conditions. refer to section 18.1.1.6 benefits of compression for more information. using the and-or logic structures, ?n range?and ?ut of range?detections (on the address and data comparators) are supported. using the counters, a breakpoint can be programmed to be recognized after an event is detected after a predefined number of times.
development support 18-10 mpc801 user? manual motorola 18 figure 18-1. watchpoints and breakpoint support the l-data comparators operate on load or store fixed-point data. when operating on fixed-point data, the l-data comparators perform a comparison on bytes, half-words and words. they treat numbers as either signed or unsigned values. the comparators generate match events and then instruction match events enter the instruction and-or logic where the instruction watchpoints and breakpoint are generated. the asserted instruction watchpoints can generate the instruction breakpoint. two different events can decrement one of the counters. when a counter on one of the instruction watchpoints expires, the instruction breakpoint is asserted. the instruction watchpoints and load/store match events on the address/data comparators enter the load/store and-or logic where the load/store watchpoints and breakpoint are generated. the load/store watchpoints (when asserted) can generate the load/store breakpoint or decrement one of the counters. when a counter on one of the load/store watchpoints expires, the load/store breakpoint is asserted. internal peripherals x x x x development system or external peripherals development port lctrl2 msr internal watchpoints logic watchpoints msr ri nonmasked control bit software trap enable bits development port trap enable bits nonmaskable breakpoint maskable breakpoint cpm code development accessible bit wise and bit wise or counters breakpoint to cpu to watchpoint pins
development support motorola mpc801 user? manual 18-11 18 watchpoints progress in the machine and are reported when they retire. internal breakpoints progress in the machine until they reach the top of the history buffer when the machine branches to the breakpoint exception routine. so the breakpoint features can be used without restricting the software, the address of the load/store cycle that generated the load/store breakpoint is not stored in the data address register. in a load/store breakpoint, the address of the load/store cycle that generated the breakpoint is stored in the breakpoint address register. 18.2.1.1 features. the following list summarizes the main features of the internal watchpoints and breakpoints: four i-address comparators supporting equal, not equal, greater than, and less than. two l-address comparators supporting equal, not equal, greater than, and less than. two l-data comparators supporting equal, not equal, greater than, and less than. no internal breakpoint/watchpoint support for unaligned words and half-words. the l-data comparators can be programmed to treat fixed-point numbers as signed or unsigned values. combined comparator pairs detect in and out of range conditions, including either signed or unsigned values on the l-data. a programmable and-or logic structure between the four instruction comparators results in five outputs, four instruction watchpoints, and one instruction breakpoint. a programmable and-or logic structure between the four instruction watchpoints and the four load/store comparators results in three outputs, two load/store watchpoints, and one load/store breakpoint. five watchpoint pins?hree for the instruction and two for the load/store. two dedicated 16-bit down counters. each can be programmed to count either an instruction watchpoint or a load/store watchpoint. only architecturally executed events are counted. on-the-fly trap enable programming of the different internal breakpoints using the serial interface of the development port. software control is also available. watchpoints do not change the timing of the machine. internal breakpoints and watchpoints are detected on the instruction during instruction fetch. internal breakpoints and watchpoints are detected on the load/store during load/ store bus cycles. instruction and load/store breakpoints and watchpoints are handled on retirement and then reported. breakpoints and watchpoints on recovered instructions (as a result of exceptions, interrupts, or miss prediction) are not reported and do not change the timing of the machine.
development support 18-12 mpc801 user? manual motorola 18 instructions with instruction breakpoints are not executed. the machine branches to the breakpoint exception routine before it executes the instruction. instructions with load/store breakpoints are executed. the machine branches to the breakpoint exception routine after it executes the instruction. the address of the access is placed in the breakpoint address register. load/store multiple and string instructions with load/store breakpoints first finish execution and then the machine branches to the breakpoint exception routine. load/store data compare is made on the load/store, after swap in store accesses and before swap in load accesses. internal breakpoints operate in masked or nonmasked mode. both ?o to x?and ?ontinue?working modes are supported for instruction breakpoints. 18.2.1.2 restrictions. there are times when the same watchpoint can be detected more than once during the execution of a single instruction. for example, a load/store watchpoint detected on more than one transfer when executing load/store multiple/string or a load/store watchpoint detected on more than one byte when working in byte mode. in these cases, only one watchpoint of the same type is reported for a single instruction. similarly, only one watchpoint of the same type can be counted in the counters for a single instruction. since watchpoint events are reported when the instruction that caused the event retires ensuing events can be reported in the same clock. moreover, if the same event is detected on more than one instruction can just be reported once. the internal counters count correctly in these cases. 18.2.1.3 byte and half-word working modes. you can use watchpoints and breakpoints to detect matches on bytes and half-words when the byte/half-word is accessed in a load/store instruction of larger data widths. for example, when loading a table of bytes using a series of load word instructions. to use this feature in word mode, the required match value should be written to the correct half-word of the data comparator and to the mask in the l-data comparator. if you prefer to break on bytes, the byte mask for each l-comparator and the bytes to be matched must be written in the data comparator. since bytes and half-words can be accessed using a larger data width instruction, it is impossible for you to predict the exact value of the l-address lines when the requested byte/ half-word is accessed. if the matched byte is byte 2 of the word and is accessed using a load word instruction, the l-address value will be of the word (byte 0). therefore, the core masks the two least-significant bits of the l-address comparators whenever a word access is performed and the least-significant bits whenever a half-word access is performed. address range is only supported when aligned according to the access size.
development support motorola mpc801 user? manual 18-13 18 18.2.1.3.1 byte working mode example looking for: data size: byte. address: 0x00000003. data value: greater than 0x07 and less than 0x0c. programming options: one l-address comparator = 0x00000003 and program for equal. one l-data comparator = 0x00000007 and program for greater than. one l-data comparator = 0x0000000c and program for less than. both byte masks = 0xe. both l-data comparators program to byte mode. result: the event will be correctly detected, regardless of the load/store instruction the compiler chooses for this access. 18.2.1.3.2 half-word working mode example 1 looking for: data size: half-word. address: greater than 0x00000000 and less than 0x0000000c. data value: greater than 0x4e204e20 and less than 0x9c409c40. programming options: one l-address comparator = 0x00000000 and program for greater than. one l-address comparator = 0x0000000c and program for less than. one l-data comparator = 0x4e204e20 and program for greater than. one l-data comparator = 0x9c409c40 and program for less than. both byte masks = 0x0. both l-data comparators program to half-word mode. result: the event will be correctly detected as long as the compiler does not use a load/store instruction with data size of byte. 18.2.1.3.3 half-word working mode example 2 looking for: data size: half-word. address: greater than or equal to 0x00000002 and less than 0x0000000e. data value: greater than 0x4e204e20 and less than 0x9c409c40. programming options: one l-address comparator = 0x00000001 and program for greater than. one l-address comparator = 0x0000000e and program for less than. one l-data comparator = 0x4e204e20 and program for greater than. one l-data comparator = 0x9c409c40 and program for less than. both byte masks = 0x0. both l-data comparators program to half-word or word mode.
development support 18-14 mpc801 user? manual motorola 18 result: the event will be correctly detected if the compiler chooses a load/store instruction with data size of half-word. if the compiler chooses load/store instructions with data size greater than half-word (word, multiple), there might be some false detections. these examples can only be ignored by the software that handles the breakpoints. the following figure illustrates this partially supported scenario: figure 18-2. partially supported watchpoints/breakpoint example 18.2.1.4 context dependent filter. the core can only be programmed to recognize internal breakpoints when the msr ri bit is set (masked mode) or to always recognize internal breakpoints (nonmasked mode). when it is programmed to recognize internal breakpoints (when msr ri =1), all parts of the code can be debugged, except when registers srr0 and srr1, dar, and dsisr are busy and msr ri =0 (in the prologues and epilogues of interrupt/exception handlers). when working in masked mode, all internal breakpoints detected when msr ri =0 are lost and detected watchpoints are not counted by the debug counters. detected watchpoints are always reported on the external pins, regardless of the value of the msr ri bit. the core defaults to masked mode after reset. it is input in the nonmasked mode by setting the brknomsk bit in the lctrl2 register.the brknomsk bit controls all internal breakpoints (i-breakpoints and l-breakpoints). see table 18-14 for details. 18.2.1.5 ignore first match option. to facilitate the debugger utilities of ?ontinue? and ?o from x? the ignore first match option is supported for the instruction breakpoints. when an instruction breakpoint is first enabled, the first instruction will not cause an instruction breakpoint if the ifm bit in the instruction support control (ictrl) register is set. this is used for ?ontinue?utilities. when ifm is clear, every matched instruction can cause an instruction breakpoint. this is used for ?o from x? the ifm bit is set by the software and cleared by the hardware following the first instruction breakpoint, the match is ignored. load/ store breakpoints and all counter-generated breakpoints (instruction and load/store) are unaffected by this mode. 0x00000000 0x00000004 0x00000008 0x0000000c 0x00000010 possible false detect on these half-words when using word/multiple
development support motorola mpc801 user? manual 18-15 18 18.2.1.6 generating compare types. using the four compare types?qual to, not equal to, greater than, and less than?t is possible to generate two additional compare types: greater than or equal to less than or equal to generating the greater than or equal to compare type can be accomplished by using the greater than compare type and programming the comparator to the value in question minus 1. likewise, generating the less than or equal to compare type can be accomplished by using the less than compare type and programming the comparator to the value in question plus 1. this method does not work for the following boundary cases: less than or equal to the largest unsigned number (1111...1) greater than or equal to the smallest unsigned number (0000...0) less than or equal to the maximum positive number when in signed mode (0111...1) greater than or equal to the maximum negative number when in signed mode (1000...) these boundary cases do not require special support because they are considered ?lways true? they can be programmed using the ignore option of the load/store watchpoint programming. see table 18-14 for more information.
development support 18-16 mpc801 user? manual motorola 18 18.2.2 basic watchpoint/breakpoint operation 18.2.2.1 instruction support. there are four instruction address comparators (a, b, c, and d). each one is 30 bits long and generates two output signals?qual to and less than?hich generates equal, not equal to, greater than, or less than. the instruction watchpoints and breakpoint are generated using these events according to the user programming. using the or option enables ?ut of range?detect. figure 18-3. instruction support general structure compare type logic compare type logic compare type logic comparator a eq lt compare type comparator b eq lt comparator c eq lt comparator d eq lt events generator and-or logic control bits a b (a&b) (a | b) c d (c&d) (c | d) i - watchpoint 0 i - watchpoint 1 i - breakpoint i - watchpoint 2 i - watchpoint 3 compare type logic
development support motorola mpc801 user? manual 18-17 18 18.2.2.2 load/store support. there are two load/store address comparators (e and f) that compare the 32 address bits and the cycle? attributes (read/write). the two least-significant bits are masked ignored whenever a word is accessed and the least-significant bit is masked whenever a half-word is accessed. each comparator generates two output signals?qual to and less than. these signals generate one of four events from each comparator?qual to, not equal to, greater than, or less than. for more information, refer to section 18.1.1.6 benefits of compression . there are two load/store data comparators (g and h) that are 32 bits wide and can be programmed to treat numbers as signed or unsigned values. each data comparator operates as four independent byte comparators that have a mask bit and generate two output signals?qual to and less than (if the mask bit is not set.) therefore, each 32-bit comparator has eight output signals. these signals generate the ?qual to and less than? signals according to the compare size programmed by the user (byte, half-word, word). when operating in byte mode, all signals are significant. in half-word mode only four signals from each comparator are significant, and in word mode only two signals are significant. one of the following four match events are generated by the equal to and less than signals?qual to, not equal to, greater than, or less than?epending on the compare type. therefore, from the two 32-bit comparators, eight match indications are generated gmatch[0:3] and hmatch[0:3]. according to the lower bits of the address and the size of the cycle, only match indications detected on bytes with valid information are validated. the rest are negated. if the executed cycle has a smaller size than the compare size (a byte access when the compare size is word or half-word), no match indication will be asserted. using the match indication signals, four load/store data events are generated as shown in the table 18-5. table 18-4. instruction watchpoints programming options name description programming options iw0 first instruction watchpoint comparator a comparators (a & b) iw1 second instruction watchpoint comparator b comparator (a | b) iw2 third instruction watchpoint comparator c comparators (c & d) iw3 fourth instruction watchpoint comparator d comparator (c | d)
development support 18-18 mpc801 user? manual motorola 18 the four load/store data events, combined with the match events of the load/store address comparators and the instruction watchpoints, are used to generate the load/store watchpoints and breakpoint according to user programming. when programming the load/store watchpoints to ignore l-address events and l-data events, the instruction must be a load/store instruction to trigger the load/store watchpoint event. 18.2.2.3 counter support. there are two 16-bit down counters that count one of the instruction watchpoints or one of the load/store watchpoints. both generate the corresponding breakpoint when they reach zero. when working in masked mode, the counters do not count detected watchpoints when msr ri =0. counter values are not predictable if they are counting watchpoints programmed on the instructions that alter the counters. readings from the active counters must be synchronized by inserting a sync instruction before a read is performed. for details, refer to section 18.1.1.6 benefits of compression . table 18-5. load/store data events event name event function g (gmatch0 | gmatch1 | gmatch2 | gmatch3) h (hmatch0 | hmatch1 | hmatch2 | hmatch3) (g & h) ((gmatch0 & hmatch0) | (gmatch1 & hmatch1) | (gmatch2 & hmatch2) | (gmatch3 & hmatch3)) (g | h) ((gmatch0 | hmatch0) | (gmatch1 | hmatch1) | (gmatch2 | hmatch2) | (gmatch3 | hmatch3)) note: & denotes a logical and, but | denotes a logical or. table 18-6. load/store watchpoint programming options name description i-address event programming options l-address event programming options l-data event programming options lw0 first load/store watchpoint iw0, iw1, iw2, iw3, ignore i-address events comparator e comparator f comparators (e & f) comparators (e | f) ignore l-address events comparator g comparator h comparators (g & h) comparators (g | h) ignore l-data events lw1 second load/store watchpoint iw0, iw1, iw2, iw3, ignore i-address events comparator e comparator f comparators (e & f) comparators (e | f) ignore l-address events comparator g comparator h comparators (g & h) comparators (g | h) ignore l-data events
development support motorola mpc801 user? manual 18-19 18 figure 18-4. load/store support general structure comparator g byte 0 eq lt compare compare add(30:31) data compare valid 0 valid 1 valid 2 valid 3 g h (g & h) (g | h) instruction l-watchpoint 0 l-watchpoint 1 l-breakpoint size logic compare byte qualifier logic events generator and-or logic control bits e f (e & f) (e | f) comparator e type logic events generator lt eq comparator f type logic lt eq compare type logic byte mask byte 1 byte 2 byte 3 eq lt eq lt eq lt eq lt eq lt eq lt eq lt size type comparator h byte 0 eq lt size logic compare byte qualifier logic type logic byte mask byte 1 byte 2 byte 3 eq lt eq lt eq lt eq lt eq lt eq lt eq lt type cycle size watchpoints size
development support 18-20 mpc801 user? manual motorola 18 note when programmed to count instruction watchpoints, the last instruction that decrements the counter to zero is treated like any other instruction breakpoint in the sense that it is not executed before the machine branches to the breakpoint exception routine. as a side effect of this behavior, the value of the counter inside the breakpoint exception routine equals 1 and not zero. when programmed to count load/store watchpoints, the last instruction that decrements the counter to zero is treated like any other load/store breakpoint in the sense that it is executed before the machine branches to the breakpoint exception routine. therefore, the value of the counter inside the breakpoint exception routine equals zero. 18.2.2.4 trap enable programming. the trap enable bits can be programmed by regular software (only if msr pr =0) using the mtspr instruction or on-the-fly using the special development port interface. for more information, refer to section 18.3.3.3 development port serial communications . the value used by the breakpoint generation logic is the bit-wise or of the software trap enable bits written using the mtspr instruction and the development port trap enable bits that are serially shifted using the development port. the software trap enable bits and development port trap enable bits can be read from the ictrl and lctrl2 registers using the mtspr instruction. for exact bit placement, refer to tables 18-18 and 18-20. 18.3 development system interface when debugging an existing system it is sometimes helpful to be able to do so without making any changes. although, in some cases it is not helpful and may even make it impossible to add load to the lines connected to the existing system. the development system interface of the core supports this configuration. the development system interface of the core uses the development port, which is a dedicated serial port that does not need any of the regular system interfaces. system activity can be controlled from the development port when the core is in debug mode. the development port is a relatively inexpensive interface that allows the development system to operate in a lower frequency than the core? frequency. it is also possible to debug the core using monitor debugger software. for more information, refer to section 18.4 the software monitor debugger . in debug mode, the core fetches all instructions from the development port. data can be read from or written to the development port. this allows memory and registers to be read and modified by a development tool or emulator connected to the development port. for protection purposes two possible working modes are defined?ebug mode enable and debug mode disable. these working modes are only selected during reset. for details, refer to section 18.1.1.6 benefits of compression .
development support motorola mpc801 user? manual 18-21 18 you can work in debug mode directly out of reset or the core can be programmed to enter into the debug mode as a result of a predefined sequence of events. these events can be any interrupt or exception in the core system (including the internal breakpoints), in addition to two levels of development port requests and one peripheral breakpoint request generated internally and externally. each of these can be programmed as a regular interrupt that causes the machine to branch to its interrupt vector or as a special interrupt that causes debug mode entry. when in debug mode, the rfi instruction returns the machine to its regular work mode. the relationship between debug mode logic and the rest of the core is illustrated in the following figure. figure 18-5. relationship between the core and debug mode the development port provides a full-duplex serial interface for communications between the internal development support logic of the core and an external development tool. the development port can operate in two working modes?rap enable mode and debug mode. development port development port icr der core 9 control logic shift register bkpt, te, vsync dpir dsck dsdi tecr dpdr 35 32 32 internal bus development port support logic dsdo vfls, frz ext bus siu / ebi
development support 18-22 mpc801 user? manual motorola 18 18.3.1 trap enable mode trap enable mode is used to shift the following control signals into the core internal development support logic: an instruction trap enable signal is used to program the instruction breakpoint on-the-fly. a load/store trap enable signal is used to program the load/store breakpoint on-the-fly. a nonmaskable breakpoint is used to assert the nonmaskable external breakpoint. a maskable breakpoint is used to assert the maskable external breakpoint. a vsync control code is used to assert and negate vsync operation. in debug mode, the development port also controls the debug mode features of the core. for more details, refer to section 18.3.3 the development port . 18.3.2 debug mode debug mode provides the development system with the following functions: controls and maintains all circumstances of processor execution. the development port can force the core to enter debug mode even when the external interrupts are disabled. debug mode can be entered immediately out of reset, thus allowing the user to debug a system without rom. the events that cause the machine to enter into debug mode can be selectively defined through an enable register. contains a cause register that indicates why debug mode is entered. after entering debug mode, program execution continues from the location where they entered debug. all instructions are fetched from the development port, while load/store accesses are performed on the real system memory in debug mode. a simple method is provided for memory dump and load via the data register of the development port that is accessed with mtspr and mfspr . the processor enters the privileged state (msr pr =0) in debug mode, thus allowing execution of any instruction and access to any storage location. an or signal of all interrupt cause register bits enables the development port to detect pending events while already in debug mode. for example, the development port can detect a debug mode access to nonexisting memory space.
development support motorola mpc801 user? manual 18-23 18 figure 18-6 illustrates the debug mode logic implemented in the core. figure 18-6. debug mode logic implementation debug enable register (der) interrupt cause register (icr) event (core interrupt set reset icr_or freeze rfi decoder q debug mode enable internal debug 5 event valid mode signal or exception)
development support 18-24 mpc801 user? manual motorola 18 18.3.2.1 debug mode enable vs. debug mode disable. for protection purposes, there are two possible working modes?ebug mode enable and debug mode disable. these modes are selected once at reset. debug mode is enabled by asserting the dsck pin during reset and the state of this pin is sampled three clocks before sreset is negated. if the dsck pin is sampled negated, debug mode is disabled until the subsequent reset that occurs when the dsck pin is asserted. when debug mode is disabled, the internal watchpoint/breakpoint hardware is still operational and can be used by a software monitor program for debugging purposes. a timing diagram for the enabling debug mode is illustrated in figure 18-7. note since sreset negation time is dependent on an external pull-up resistor, any reference to sreset negation time refers to the time the mpc801 releases sreset . if the rise time of sreset is long because of a large resistor, the setup time for the debug port signals should be adjusted accordingly. when debug mode is disabled, all development support registers are accessible when msr pr =0 and can be used by the monitor debugger software. however, the processor never enters debug mode and the icr and der are only used to assert and negate the freeze signal. for more information on the software monitor debugger, refer to section 18.4 the software monitor debugger . only when the core is in debug mode are all development support registers accessible. therefore, the development system has full control of the core? development support features. for more information, see table 18-12. 18.3.2.2 entering debug mode. debug mode entry can be the result of a number of events. all events have a programmable enable bit so you can selectively decide that the cause of debug mode entry as well as the events that require regular interrupt handling. entering debug mode is possible immediately out of reset, thus allowing a system to be debugged without rom. this occurs by specially programming the development port during reset. if the dsck pin is asserted throughout sreset assertion and then past sreset negation, the processor will take a breakpoint exception and go directly to debug mode instead of fetching the reset vector.
development support motorola mpc801 user? manual 18-25 18 figure 18-7. debug mode reset configuration timing diagram dsck clkout sreset dsck asserts high while sreset asserted to enable debug mode operation. 012345891011121314151617 dsck asserts high following sreset negation to enable debug mode immediately.
development support 18-26 mpc801 user? manual motorola 18 to avoid entering debug mode after reset, the dsck pin must be negated no later than seven clock cycles after sreset negates to allow the processor to jump to the reset vector and begin normal execution. entering debug mode immediately after reset, bit 31 (development port interrupt bit) of the interrupt cause register (icr) is set. for details, refer to the timing diagram illustrated in figure 18-7. when debug mode is disabled, all events result in regular interrupt handling. the internal freeze signal is asserted whenever an enabled event occurs, regardless of whether debug mode is enabled or disabled. the internal freeze signal is connected to all relevant internal modules that can be programmed to stop all operations in response to assertion of the freeze signal. furthermore, the freeze indication is negated when exiting the debug mode. for more information, refer to section 18.4.1 freeze indication . the following list of events could cause the core to enter debug mode. each event results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. the reset values of the enable bits allow the debug mode features to be used without having to program the debug enable register (der). for more information, see table 18-18. system reset as a result of sreset assertion check stop machine check interrupt implementation specific instruction tlb miss implementation specific instruction tlb error implementation specific data tlb miss implementation specific data tlb error external interrupt, recognized when msr ee =1 alignment interrupt program interrupt floating-point unavailable interrupt decrementer interrupt, recognized when msr ee =1 system call interrupt trace asserted when in single or branch trace mode implementation dependent software emulation interrupt instruction breakpoint is recognized only when msr ri =1 and when breakpoints are masked. when breakpoints are not masked, they are always recognized. load/store breakpoint is recognized only when msr ri = 1 and when breakpoints are masked. when breakpoints are not masked, they are always recognized. peripheral breakpoint from the development port generated by external modules are recognized only when msr ri =1. development port nonmaskable interrupt occurs as a result of a debug station request. useful in some catastrophic events like an endless loop when msr ri =0. as a result of this event, the machine can enter a nonrestartable state.
development support motorola mpc801 user? manual 18-27 18 the processor enters into the debug mode state when at least one of the bits in the icr is set, the corresponding bit in the der is enabled, and debug mode is enabled. when debug mode is enabled and an enabled event occurs, the processor waits until its pipeline is empty and then starts fetching the next instructions from the development port. for information on the exact value of srr0 and srr1, refer to section 7.3.7.3 definitions . when the processor is in debug mode, the freeze indication is asserted, thus allowing any properly programmed peripheral to stop. the fact that the core is in debug mode is also broadcasted to the external world using the value b?1?on the vfls pins. the freeze signal can be asserted by the software when debug mode is disabled. the development port should read the value of the icr to find out what causes debug mode entry. reading the icr clears all of its bits. 18.3.2.3 checkstop state and debug mode. the core enters checkstop state if the machine check interrupt is disabled (msr me =0) and a machine check interrupt is detected. however, if a machine check interrupt is detected when msr me =0, debug mode is enabled, the checkstop enable bit in the der is set, and the core enters debug mode rather then the checkstop state. the various actions taken by the core when a machine check interrupt is detected are provided in the following table. 18.3.2.4 saving the machine state in debug mode. if entering debug mode is the result of a load/store-type exception, the data address register (der) and data/storage interrupt status register (dsisr) contain critical information. these two registers must be saved before any other operation is performed. failing to save these registers can result in information loss if another load/store-type exception occurs inside the development software. since exceptions are treated differently in debug mode, there is no need to save the save/restore registers 0 and 1 (srr0 and srr1). table 18-7. checkstop state and debug mode msr me debug mode enable chstpe 2 mcie 2 action performed by the core when a machine check interrupt is detected interrupt cause register value 0 0 x x enter checkstop state 0x20000000 1 0 x x branch to the machine check interrupt 0x10000000 0 1 0 x enter checkstop state 0x20000000 0 1 1 x enter debug mode 0x20000000 1 1 x 0 branch to the machine check interrupt 0x10000000 1 1 x 1 enter debug mode 0x10000000 notes: 1. the checkstop enable bit of the der. 2. the machine check interrupt enable bit of the der.
development support 18-28 mpc801 user? manual motorola 18 18.3.2.5 running in debug mode. when running in debug mode, all fetch cycles access the development port, regardless of the cycle? actual address. all load/store cycles access the real memory system according to the cycle? address. the data register of the development port is mapped as a special control register and is accessed using the mtspr and mfspr instructions, via special load/store cycles. exceptions are treated differently in debug mode. when in debug mode, the icr is updated when an exception is recognized by the event that caused the exception. a special error indication (icr_or) is asserted for one clock cycle to notify the development port that an exception has occurred. execution then continues in debug mode without any change in srr0 and srr1. icr_or is asserted before the next fetch occurs so the development system can detect the excepting instruction. however, not all exceptions are recognizable in debug mode. breakpoints and watchpoints are not generated by the hardware when in debug mode, regardless of the msr ri bit? value. when entering debug mode, the msr ee bit is cleared by the hardware, thus forcing the hardware to ignore external and decrementer interrupts. caution setting the msr ee bit while in debug mode is strictly forbidden. the reason for this restriction is that the external interrupt event is a level signal and because the core only reports exceptions in debug mode and does not perform exception processing, the core hardware does not clear the msr ee bit. this event, if enabled, is then recognized on every clock. when the icr_or signal is asserted the development station must search the icr to find out what caused the exception. since the values in srr0 and srr1 do not change if an exception is recognized in debug mode, they only change once when entering debug mode. however, saving srr0 and srr1 when entering debug mode is unnecessary. 18.3.2.6 exiting debug mode. the rfi instruction is used to exit from debug mode and return to normal processor operation and negate the freeze signal. the development system may monitor the frz signal or status to make sure the mpc801 is out of debug mode. it is the responsibility of the software to read the icr before performing the rfi instruction. failure to do so forces the core to immediately reenter debug mode and reassert the freeze signal if an asserted bit in the icr has a corresponding enable bit set in the der. 18.3.3 the development port the development port provides a full-duplex serial interface for communications between the internal development support logic and an external development tool. the relationship of the development support logic to the rest of the core is illustrated in table 18-5. notice that the development port support logic is shown as a separate block for clarity. it will be implemented as part of the system interface unit module.
development support motorola mpc801 user? manual 18-29 18 18.3.3.1 the development port pins. the following development port pin functions are provided: development serial clock development serial data in development serial data out freeze 18.3.3.1.1 development serial clock. the dsck pin is used to shift data into and out of the development port shift register. at the same time, the new most-significant bit of the shift register is presented to the dsdo pin. future references to the dsck pin imply the internally synchronized value of the clock. the dsck pin must be driven either high or low at all times and is not allowed to float. with a resistor, a typical target environment would pull this input low. the clock can be implemented as a free-running or gated clock. the ready and start signals control data shifting, so the clock does not need to be gated with the serial transmissions. the dsck pin is used at reset to enable debug mode either immediately following reset or to enter debug mode during an event. 18.3.3.1.2 development serial data in. data to be transferred into the development port shift register is presented at the dsdi pin by external logic. when driven asynchronous with the system clock, the data presented to the dsdi pin must be stable at setup time before the rising edge of dsck and at hold time after the rising edge of dsck. when driven synchronous to the system clock, the data must be stable on dsdi or a setup time before system clock output (clkout) rising edge and a hold time after the rising edge of clkout. the dsdi pin is also used at reset to control the overall chip configuration mode and determine the development port clock mode. refer to section 18.3.3.3 development port serial communications for more information. 18.3.3.1.3 development serial data out. the debug mode logic shifts data out of the development port shift register using the dsdo pin. all transitions on dsdo are synchronous with dsck or clkout, depending on the clock mode. data will be valid at setup time before the rising edge of the clock and remains valid at hold time after the rising edge of the clock. see table 18-10 for details about dsdo data. 18.3.3.1.4 freeze. the freeze signal means that the processor is in debug mode and normal processor execution of user code is frozen. freeze state is indicated on the frz pin and is generated synchronous to the system clock. this indication can be used to halt any off-chip device while in debug mode and is a handshake between the debug tool and port. in addition to the frz pin, the freeze state is indicated by the value b11 on the vfls[0:1] pins. the internal freeze status can also be monitored through status in the data shifted out of the debug port.
development support 18-30 mpc801 user? manual motorola 18 figure 18-8. development port/bdm connector pinout options 18.3.3.2 development port registers. the development port consists logically of three registers?evelopment port instruction register (dpir), development port data register (dpdr), and trap enable control register (tecr). however, these registers are physically implemented as two registers?he development port shift and trap enable control registers. the development port shift register acts as both the dpir and dpdr, depending on the operation being performed. it is also used as a temporary holding register for data to be stored in the tecr. 18.3.3.2.1 development port shift register. the 35-bit development port shift register has instructions and data serially shifted into it from the dsdi using either dsck or clkout as the shift clock, depending on the debug port clock mode. for more information, refer to section 18.3.3.3 development port serial communications . the instructions or data are then transferred in parallel to the core and the trap enable control register. when the processor enters debug mode it fetches instructions from the dpir, which causes an access to the development port shift register. these instructions are serially loaded into the shift register from the dsdi using dsck or clkout as the shift clock (similar to the way data is transferred to the core). data is shifted into the shift register and read by the processor when a ?ove from special purpose register dpdr?instruction is executed. data is also parallel loaded into the development port shift register from the core by executing a ?ove to special purpose register dpdr?instruction. it is then serially shifted out to the dsdo using dsck or clkout as the shift clock. 12 3 4 56 78 910 12 3 4 56 78 910 vfls0 gnd gnd hreset v sreset dsck vfls1 dsdi dsdo od frz gnd gnd hreset v sreset dsck frz dsdi dsdo od
development support motorola mpc801 user? manual 18-31 18 18.3.3.2.2 trap enable control register. the 9-bit trap enable control register (tecr) is loaded from the development port shift register. the content of this register drives the six trap enable signals, two breakpoint signals, and the vsync signal to the core. the transfer data to trap enable control register commands are used to force the appropriate bits to transfer to this register. the trap enable control register is not accessed by the core, but supplies signals to the core. the trap enable bits, vsync bit, and the breakpoint bits of this register are loaded from the development port shift register as a result of trap enable mode transmissions. the trap enable bits are reflected in the ictrl and lctrl2 special registers. refer to section 18.5.2 development port registers for more information on the support registers. 18.3.3.2.3 decoding the development port registers. the development port shift register is selected when the core accesses the dpir or dpdr registers. accesses to these two special purpose registers occur in debug mode and appear on the internal bus as an address and the assertion of an address attribute signal indicating that a special purpose register is being accessed. the dpir is read by the core to fetch all instructions when in debug mode and the dpdr is read and written to transfer data between the core and external development tools. the dpir and dpdr are pseudo-registers, so decoding either of these registers causes the development port shift register to be accessed. the debug mode logic knows whether the core is fetching instructions or reading or writing data. a sequence error is signaled to the external development tool when the core expected result and the general-purpose register result do not match. an example of this would be when an instruction is received instead of the expected data. 18.3.3.3 development port serial communications 18.3.3.3.1 clock mode selection. all of the serial transmissions are clocked transmissions and are synchronous communications. with clkout, the transmission clock can either be synchronous or asynchronous. the development port has two methods for clocking serial transmissions. the first method allows the transmission to occur without being externally synchronized to clkout. in this mode, a serial clock dsck must be supplied to the mpc801. the other communication method requires data to be externally synchronized with clkout. the first clock mode is called asynchronous clocked since the input clock dsck is asynchronous with respect to clkout. to be sure that data on dsdi is sampled correctly, transitions on dsdi must meet all setup and hold times in respect to the rising edge of dsck. this clock mode allows communications with the port from a development tool that does not have access to the clkout signal or has either a delayed or skewed clkout signal. the timing diagram in figure 18-9 illustrates serial communication asynchronous clocked timing.
development support 18-32 mpc801 user? manual motorola 18 the second clock mode is called synchronous self-clocked and does not require an input clock. instead, the port is clocked by the system clock. the dsdi input is required to meet setup and hold time requirements, with respect to the clkout rising edge. the data rate for this mode is always the same as the system clock. the timing diagram in figure 18-10 illustrates serial communication synchronous self-clocked timing. the selection of clocked or self-clocked mode is made at reset. the state of the dsdi input is latched eight clocks after sreset is negated. if it is latched low, asynchronous clocked mode is enabled. if it is latched high, then synchronous self-clocked mode is enabled. the timing diagram in figure 18-11 illustrates the clock mode selection following reset. since dsdi is used to select the development port clock scheme, any transitions on dsdi during clock mode select must be prevented from being recognized as the start of a serial transmission. the port will not begin scanning for the start bit of a serial transmission until 16 clocks after sreset is negated. if dsdi is asserted 16 clocks after sreset negates, the port waits until dsdi is negated before it starts scanning for the start bit. 18.3.3.3.2 trap enable mode. when not in debug mode, the development port begins communicating by setting dsdo low to show that all activity related to the previous transmission is complete and that a new transmission can begin. the start of a serial transmission from an external development tool to the development port is signaled by a start bit. a mode bit in the transmission defines it as either a trap enable mode or debug mode transmission. if the mode bit is set, the transmission will be 10 bits long and only seven data bits will be shifted into the shift register. these seven bits will be latched into the tecr. a control bit determines whether the data is latched into the tecr? trap enable, vsync, or breakpoint bits. note the development port shift register is 35 bits wide, but trap enable mode transmissions only use 10 of the 35 bits?he start/ready bits, mode/status bits, control/status bits, and seven least-significant data bits. the data encoding shifted into the development port shift register (through the dsdi pin) is shown in tables 8-8 and 8-9.
development support motorola mpc801 user? manual 18-33 18 figure 18-9. asynchronous clocked serial communications timing diagram dsck dsdi mode cntrl di<0> s<0> s<1> do<0> start ready dsdo debug port drives the ?eady bit onto dsdo when ready for a new transmission. note: dsck and dsdi transitions are not required to be synchronous with clkout. di di di do do do debug port detects the ?tart bit on dsdi and follows the ?eady bit with two status bits and 7 or 32 output data bits. development tool drives the ?tart bit on dsdi (after detecting the ?eady bit on dsdo when in debug mode). the ?tart bit is immediately followed by a mode bit and a control bit and then 7 or 32 input data bits.
development support 18-34 mpc801 user? manual motorola 18 figure 18-10. synchronous self-clocked serial communications timing diagram clkout debug port drives the ?eady?bit onto dsdo when the cpu starts a read of dpir or dpdr. dsdi mode cntrl di<0> start di<1> s<0> s<1> do<0> ready dsdo do<1> do do do do di di di di debug port detects the ?tart?bit on dsdi and follows the ?eady? bit with two status bits and 7 or 32 output data bits. development tool drives the ?tart?bit onto dsdi (after detecting the ?eady?bit on dsdo when in debug mode). the ?tart?bit is immediately followed by a mode bit and a control bit and then 7 or 32 input data bits.
development support motorola mpc801 user? manual 18-35 18 figure 18-11. enabling clock mode following reset timing diagram dsdi clkout sreset dsdi negates following sreset negation to enable clocked mode. clken 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 first start bit detected after dsdi negation (self-clocked mode). the internal clock enable signal asserts 8 clocks after sreset negation if dsdi is negated. this enables clocked mode.
development support 18-36 mpc801 user? manual motorola 18 the watchpoint trap enable and vsync functions are described in section 18.2 watchpoint and breakpoint generation and section 18.1 program flow tracking . the debug port command function allows the development tool to either assert or negate breakpoint requests, reset the processor, or activate or deactivate the fast download procedure. note in trap enable mode, there is no data out of the development port. data from the development port in the trap enable mode is shown in table 18-10. table 18-8. trap enable data shifted into development port shift register start mode control first second third fourth first second vsync function instruction data watchpoint trap enables 1 1 0 0 = disabled 1 = enabled transfer data to trap enable control register table 18-9. debug port command shifted into the development port shift register start mode control extended opcode major opcode function 1 1 1 x x 00000 nop 00001 hard reset request 00010 soft reset request 0 x 00011 reserved 1 0 00011 end download procedure 1 1 00011 start download procedure x x 00100 ?11110 reserved x 0 11111 negate maskable breakpoint x 1 11111 assert maskable breakpoint 0 x 11111 negate nonmaskable breakpoint 1 x 11111 assert nonmaskable breakpoint
development support motorola mpc801 user? manual 18-37 18 in trap enable mode the ?alid data from cpu?and ?pu interrupt?status cannot occur. when not in debug mode, sequencing error encoding indicates that the transmission from the external development tool was a debug mode transmission. when a sequencing error occurs, the development port ignores the data shifted in while the sequencing error is shifting out and considered a no operation (nop) function. the null output encoding indicates that the previous transmission did not have any associated errors. when not in debug mode, ready is asserted at the end of each transmission. if debug mode is not enabled and transmission errors are guaranteed not to occur, the status output is not needed. 18.3.3.3.3 debug mode. when in debug mode the development port starts communicating by setting dsdo low to show that the core is trying to read an instruction from the dpir or data from the dpdr. when the core writes data to the port to be shifted out, the ready bit is not set. the port waits for the core to read the next instruction before asserting ready. this allows duplex operation of the serial port while allowing the port to control all transmissions from the external development tool. after detecting this ready status, the external development tool begins transmitting to the development port with a start bit (logic high) on the dsdi pin. in debug mode, the 35 bits of the development port shift register are interpreted as a start/ready bit, mode/status bit, control/status bit, and 32 bits of data. all instructions and data for the core are transmitted with the mode bit cleared, thus indicating a 32-bit data field. the encoding of data shifted into the development port shift register through the dsdi pin is shown in table 18-11. unless otherwise specified, the data values in the last two functions are reserved. table 18-10. status/data shifted out of the development port shift register ready status [0:1] data function bit 0 bit 1 bits 2?1 or 2?, depending on the input mode (0) 0 0 data valid data from core (0) 0 1 freeze status download procedure in progress 1s sequencing error (0) 1 0 1s core interrupt (0) 1 1 1s null notes: 1. the freeze status is set to 1 when the core is in debug mode. otherwise, it is set to 0. 2. the ?ownload procedure in progress status is asserted (0) when the debug port in the download procedure is negated. otherwise, it is set to 1.
development support 18-38 mpc801 user? manual motorola 18 all transmissions from the debug port on dsdo begin with a zero or ready bit. this indicates that the core is trying to read an instruction or data from the port. the external development tool waits until it sees dsdo go low before it begins sending the next transmission. the control bit differentiates between instructions and data that allows the development port to detect when an instruction was entered when the core was expecting data and vice versa. if this occurs, a sequence error indication is shifted out in the next serial transmission. the trap enable function allows the development port to transfer data to the trap enable control register. the debug port command function allows the development tool to either negate breakpoint requests, reset the processor, or activate or deactivate the fast download procedure. the nop function provides a null operation to use when there is data or a response to be shifted out of the data register. the next appropriate instruction or command will be determined by the value of the response or data shifted out. the encoding of data shifted out of the development port shift register in debug mode is the same as for trap enable mode, as shown in table 18-10. the valid data encoding is used when data has been transferred from the core to the development port shift register. this results when an instruction to move the contents of a general-purpose register to the dpdr occurs. the valid data encoding has the highest priority of all status outputs and will be reported even if an interrupt occurs at the same time. since it is not possible for a sequencing error to occur that has valid data, there is no priority conflict with the sequencing error status. also, any interrupt that is recognized at the same time that there is valid data, is not related to the execution of an instruction. therefore, a valid data status will be output and the interrupt status will be saved for the next transmission. table 18-11. debug instructions/data shifted into the development port shift register start mode control instruction / data (32 bits) function bits 0? bits 7?1 1 0 0 core instruction transfer instruction to core 1 0 1 core data transfer data to core 1 1 0 trap enable bits not exist transfer data to trap enable control register 1 1 1 0011111 not exist negate breakpoint requests to core 1 1 1 0 not exist nop note: see table 18-8 for details on trap enable bits.
development support motorola mpc801 user? manual 18-39 18 the sequencing error encoding indicates that the external development tool inputs are not what the development port and/or the core was expecting. there are two possible causes of this error: the processor was trying to read instructions and data was shifted into the development port. the processor was trying to read data and an instruction was shifted into the development port. nonetheless, the port terminates the read cycle with a bus error. in turn, this bus error causes the core to signal that an interrupt exception has occurred. since a status of sequencing error has higher priority than an exception, the port reports the sequencing error first and the core interrupt on the next transmission. the development port ignores the command, instruction, or data shifted in while the sequencing error or core interrupt is shifted out. the next transmission, after all error status is reported to the port, should either be a new instruction, trap enable, or command. when an interrupt encoding occurs, it indicates that the core has encountered an interrupt while executing the previous instruction in debug mode. interrupts can occur as a result of instruction execution either because of memory access faults or from unmasked external interrupts. when an interrupt occurs, the development port ignores the command, instruction, or data shifted in while the interrupt encoding was shifting out. the next transmission to the port should be a new instruction, trap enable, or debug port command. finally, the null encoding indicates that no data has been transferred from the core to the development port shift register. a fast download procedure is used to download a block of data from the debug tool into the system memory. this procedure can be accomplished by repeating the following sequence of transactions from the development tool to the debug port for the number of data words to be downloaded. init:save rx, ry ry <- memory block address- 4 repeat:mfsprrx, dpdr data word to be moved to memory stwurx, 0x4(ry) until here restore rx,ry figure 18-12. example of download procedure code
development support 18-40 mpc801 user? manual motorola 18 for large blocks of data, this sequence can take a significant amount of time to complete. but, using the fast download procedure of the debug port reduces this time because the need to transfer the instructions in the debug port loop is eliminated. the only transactions needed are those used to transfer the data to be placed in the system memory. figures 18-13 and 18-14 illustrate the benefit of using the fast download procedure. figure 18-13. slow download procedure loop figure 18-14. fast download procedure loop the sequence of the instructions used in the fast download procedure is illustrated in figure 18-12, with rx = r31 and ry = r30. this sequence is repeated infinitely until the end download procedure command is issued to the debug port. the internal general-purpose register 31 is used for temporary storage of the data value. before beginning the fast download procedure by the start download procedure command, the value of the first memory block address -4 must be written into the general-purpose register 30. to end the download procedure, an end download procedure command should be issued to the debug port and then an additional data transaction should be sent by the development tool. this data word will not be placed into the system memory, but it is needed to stop the procedure. 18.4 the software monitor debugger when in debug mode disable, a software monitor debugger can use all of the development support features defined in the core. when debug mode is disabled, all events result in regular interrupt handling (the processor resumes execution in the corresponding interrupt handler). the icr and der only influence the assertion and negation of the freeze signal. external mfspr data stwu transaction internal activity external data transaction internal activity
development support motorola mpc801 user? manual 18-41 18 18.4.1 freeze indication the internal freeze signal is connected to all relevant internal modules that can be programmed to stop all operations when the freeze signal is asserted. so that a software monitor debugger can signal when the debug software has executed, the internal freeze signal must be asserted or negated when debug mode is disabled. the frz signal indicates to the external world when the freeze signal is asserted or negated. the icr and der signals control whether or not the freeze signal is asserted or negated while it is in debug mode disable, as illustrated in figure 18-6. to assert the freeze signal, the software must program the relevant bits in the der, but to negate it, the software must read the icr to clear it and perform an rfi instruction. if the icr is not cleared before the rfi instruction is performed, the freeze signal is not negated and it can nest inside a software monitor debugger without affecting the value of the freeze line, (although rfi may be performed a few times). only before the last rfi instruction does the software need to clear the icr. this process enables the software to accurately control the when the freeze line is asserted or negated. 18.5 programming the development support registers these registers reside in the control register space and can be accessed using the mtspr and mfspr instructions. the addresses of these registers are in table 6-9. 18.5.1 protecting the development port registers the development support registers are protected according to the standards in the following table. take note of the icr and dpdr registers?special behavior. table 18-12. development support register protection operation msr pr debug mode enable in debug mode result read register 0 0 x a read is performed and when reading icr, it is also cleared. 0 1 0 a read is performed and when reading icr, it is not cleared. 0 1 1 a read is performed and when reading icr, it is also cleared. 1 x x a read is not performed, a program interrupt is generated, and when reading icr, it is not cleared. write register 0 0 x a write is performed, a write to icr is ignored, and a write to dpdr is ignored. 0 1 0 a write is ignored. 0 1 1 a write is performed and a write to icr is ignored. 1 x x a write is not performed, but a program interrupt is generated. note: ignored means the register is not modified and no interrupt is generated.
development support 18-42 mpc801 user? manual motorola 18 18.5.2 development port registers 18.5.2.1 comparator a? value register. this bit has an undefined reset value. bits 30?1?eserved these bits are reserved and should be set to 0. 18.5.2.2 comparator e? value register. this bit has an undefined reset value. 18.5.2.3 comparator g? value register. this bit has an undefined reset value. 18.5.2.4 breakpoint address register. this bit has an undefined reset value. cmpa-d bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cmpv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field cmpv reserved cmpe-f bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cmpv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field cmpv cmpg-h bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cmpv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field cmpv bar bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field barv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field barv
development support motorola mpc801 user? manual 18-43 18 18.5.2.5 instruction support control register cta?ompare type of comparator a 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. ctb?ompare type of comparator b 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. ctc?ompare type of comparator c 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. ctd?ompare type of comparator d 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. iw0?nstruction first watchpoint programming 0x = not active (reset value). 10 = match from comparator a. 11 = match from comparators (a & b). iw1?nstruction second watchpoint programming 0x = not active (reset value). 10 = match from comparator b. 11 = match from comparators (a | b). cmpg-h bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cta ctb ctc ctd iw0 iw1 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field iw2 iw3 siw0en siw1en siw2en siw3en diw0en diw1en diw2en diw3en ifm isct_ser
development support 18-44 mpc801 user? manual motorola 18 iw2?nstruction third watchpoint programming 0x = not active (reset value). 10 = match from comparator c. 11 = match from comparators (c & d). iw3?nstruction fourth watchpoint programming 0x = not active (reset value). 10 = match from comparator d. 11 = match from comparators (c | d). siw0en?oftware trap enable selection of the first instruction watchpoint 0 = trap disabled (reset value). 1 = trap enabled. siw1en?oftware trap enable selection of the second instruction watchpoint 0 = trap disabled (reset value). 1 = trap enabled. siw2en?oftware trap enable selection of the third instruction watchpoint 0 = trap disabled (reset value). 1 = trap enabled. siw3en?oftware trap enable selection of the fourth instruction watchpoint 0 = trap disabled (reset value). 1 = trap enabled. diw0en?evelopment port trap enable selection of the first instruction watchpoint this is a read-only bit. 0 = trap disabled (reset value). 1 = trap enabled. diw1en?evelopment port trap enable selection of the second instruction watchpoint this is a read-only bit. 0 = trap disabled (reset value). 1 = trap enabled. diw2en?evelopment port trap enable selection of the third instruction watchpoint this is a read-only bit. 0 = trap disabled (reset value). 1 = trap enabled.
development support motorola mpc801 user? manual 18-45 18 diw3en?evelopment port trap enable selection of the fourth instruction watchpoint this is a read-only bit. 0 = trap disabled (reset value). 1 = trap enabled. ifm?gnore first match only for instruction breakpoints 0 = do not ignore first match, used for ?o to x?(reset value). 1 = ignore first match (used for ?ontinue?. isct_ser?nstruction fetch show cycle and core serialize control changing the instruction show cycle programming starts to take effect only from the second instruction after the actual mtspr instruction to ictrl. 000 = core is fully serialized and show cycle will be performed for all fetched instructions (reset value). has a reset value of 0x00000000. 001 = core is fully serialized and show cycle will be performed for all changes in the program flow. 010 = core is fully serialized and show cycle will be performed for all indirect changes in the program flow. 011 = core is fully serialized and no show cycles will be performed for fetched instructions. 100 = illegal. 101 = core is not serialized (normal mode) and show cycle will be performed for all changes in the program flow. if the fetch of the target of a direct branch is aborted by the core, the target is not always visible on the external pins. this does not affect program trace. 110 = core is not serialized (normal mode) and show cycle will be performed for all indirect changes in the program flow. 111 = core is not serialized (normal mode) and no show cycles will be performed for fetched instructions. when ictrl[29:31] is set to 010 or 110, the sts functionality of the op2/modck1/sts pin must be enabled by writing 10 or 11 to the dbgc field of the siumcr. the address on the external bus should only be sampled when sts is asserted.
development support 18-46 mpc801 user? manual motorola 18 18.5.2.6 load/store support comparators control register cte?ompare type, comparator e 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. ctf?ompare type, comparator f 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. ctg?ompare type, comparator g 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. cth?ompare type, comparator h 0xx = not active (reset value). 100 = equal to. 101 = less than. 110 = greater than. 111 = not equal to. crwe?elect match on read/write of comparator e 0x = ?on? care?(reset value). 10 = match on read. 11 = match on write. crwf?elect match on read/write of comparator f 0x = ?on? care?(reset value). 10 = match on read. 11 = match on write. lctrl1 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cte ctf ctg cth crwe crwf bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field csg csh susg sush cgbmsk chbmsk reserved
development support motorola mpc801 user? manual 18-47 18 csg?ompare size, comparator g 00 = reserved. 01 = word. 10 = half-word. 11 = byte. csh?ompare size, comparator h 00 = reserved. 01 = word. 10 = half-word. 11 = byte. susg?igned/unsigned operating mode for comparator g 0 = signed. 1 = unsigned. sush?igned/unsigned operating mode for comparator h 0 = signed. 1 = unsigned. cgbmsk?yte mask for comparator g 0000 = all bytes are not masked. 0001 = last byte of the word is masked. 1111 = all bytes are masked. chbmsk?yte mask for comparator h 0000 = all bytes are not masked. 0001 = last byte of the word is masked. 1111 = all bytes are masked. bits 30?1?eserved these bits are reserved and should be set to 0.
development support 18-48 mpc801 user? manual motorola 18 18.5.2.7 load/store support and?r control register. the reset value of this register is 0x00000000. lw0en?irst load/store watchpoint enable 0 = watchpoint not enabled (reset value). 1 = watchpoint enabled. lw0ia?irst load/store watchpoint i-address watchpoint selection 00 = first instruction watchpoint. 01 = second instruction watchpoint. 10 = third instruction watchpoint. 11 = fourth instruction watchpoint. lw0iadc?irst load/store watchpoint care/don? care i-address events 0 = ?on? care. 1 = ?are. lw0la?irst load/store watchpoint l-address events selection 00 = match from comparator e. 01 = match from comparator f. 10 = match from comparators (e & f). 11 = match from comparators (e | f). lw0ladc?irst load/store watchpoint care/don? care l-address events 0 = ?on? care. 1 = ?are. lw0ld?irst load/store watchpoint l-data events selection 00 = match from comparator g. 01 = match from comparator h. 10 = match from comparators (g & h). 11 = match from comparators (g | h). lw0lddc?irst load/store watchpoint care/don? care l-data events 0 = ?on? care. 1 = ?are. lctrl2 bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field lw0en lw0ia lw0ia dc lw0la lw0la dc lw0ld lw0ld dc lw1en lw1ia lw1ia dc lw1la bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field lw1la dc lw1ld lw1ld dc brkno msk reserved dlw0e n dlw1e n slw0e n slw1e n
development support motorola mpc801 user? manual 18-49 18 lw1en?econd load/store watchpoint enable 0 = watchpoint not enabled (reset value). 1 = watchpoint enabled. lw1ia?econd load/store watchpoint i-address watchpoint selection 00 = first instruction watchpoint. 01 = second instruction watchpoint. 10 = third instruction watchpoint. 11 = fourth instruction watchpoint. lw1iadc?econd load/store watchpoint care/don? care i-address event 0 = ?on? care. 1 = ?are. lw1la?econd load/store watchpoint l-address events selection 00 = match from comparator e. 01 = match from comparator f. 10 = match from comparators (e & f). 11 = match from comparators (e | f). lw1ladc?econd load/store watchpoint care/don? care l-address events 0 = ?on? care. 1 = ?are. lw1ld?econd load/store watchpoint l-data events selection 00 = match from comparator g. 01 = match from comparator h. 10 = match from comparators (g & h). 11 = match from comparator (g | h). lw1lddc?econd load/store watchpoint care/don? care l-data events 0 = ?on? care. 1 = ?are. brknomsk?nternal breakpoints nonmask bit controls both instruction breakpoints and load/store breakpoints 0 = masked mode, breakpoints are recognized only when msr ri =1 (reset value). 1 = nonmasked mode, breakpoints are always recognized. bits 21?7?eserved these bits are reserved and should be set to 0. dlw0en?evelopment port trap enable selection of the first load/store watchpoint (read-only bit) 0 = trap disabled (reset value). 1 = trap enabled.
development support 18-50 mpc801 user? manual motorola 18 dlw1en?evelopment port trap enable selection of the second load/store watchpoint (read-only bit) 0 = trap disabled (reset value). 1 = trap enabled. slw0en?oftware trap enable selection of the first load/store watchpoint 0 = trap disabled (reset value). 1 = trap enabled. slw1en?oftware trap enable selection of the second load/store watchpoint 0 = trap disabled (reset value). 1 = trap enabled. each watchpoint programming consists of three control register fields?wxia, lwxla, and lwxld. all three conditions must be detected to assert a watchpoint. 18.5.2.8 breakpoint counter a value and control register. reset value for bits 0-15 is undefined and for bits 16-31 it is 0x0000. cntv?ounter preset value bits 16?9?eserved these bits are reserved and should be set to 0. cntc?ounter source select 00 = not active (reset value). 01 = instruction first watchpoint. 10 = load/store first watchpoint. 11 = reserved. counta bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cntv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved cntc
development support motorola mpc801 user? manual 18-51 18 18.5.2.9 breakpoint counter b value and control register cntv?ounter preset value bits 16?9?eserved these bits are reserved and should be set to 0. cntc?ounter source select 00 = not active (reset value). 01 = instruction second watchpoint. 10 = load/store second watchpoint. 11 = reserved. 18.5.3 debug mode registers 18.5.3.1 interrupt cause register. the reset value for this register is 0x00000000. bits 0, 4, and 5?eserved these bits are reserved and should be set to 0. rst?eset interrupt this bit is set when the system reset pin is asserted. this pin is not implemented in the core. chstp?heck stop this bit is set when the machine check interrupt is asserted and msr me =0. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. otherwise, the processor enters the check stop state. mci?achine check interrupt this bit is set when the machine check interrupt is asserted and msr me =1. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. countb bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field cntv bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved cntc icr bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field res rst chstp mci reserved exti ali pri fpuvi deci reserved sysi tr res bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field res sei itlbms itlber dtlbms dtlber reserved lbrk ibrk ebrk dpi
development support 18-52 mpc801 user? manual motorola 18 exti?xternal interrupt this bit is set when the external interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. ali?lignment interrupt this bit is set when the alignment interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. pri?rogram interrupt this bit is set when the program interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. fpuvi?loating-point unavailable interrupt this bit is set when the floating-point unavailable interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. deci?ecrementer interrupt this bit is set when the decrementer interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. bits 11?2 and 15?6?eserved these bits are reserved and should be set to 0. sysi?ystem call interrupt this bit is set when the system call interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. tr?race interrupt this bit is set when in single-step mode or when in branch trace mode. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. sei?mplementation dependent software emulation interrupt this bit is set when the floating-point assist interrupt is asserted. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. itlbms?mplementation specific instruction tlb miss this bit is set as a result of an instruction tlb miss. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. itlber?mplementation specific instruction tlb error this bit is set as a result of an instruction tlb error. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. dtlbms?mplementation specific data tlb miss this bit is set as a result of an data tlb miss. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set.
development support motorola mpc801 user? manual 18-53 18 dtlber?mplementation specific data tlb error this bit is set as a result of an data tlb error. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. bits 22?7?eserved these bits are reserved and should be set to 0. lbrk?oad/store breakpoint interrupt this bit is set as a result of the assertion of an load/store breakpoint. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. ibrk?nstruction breakpoint interrupt this bit is set as a result of the assertion of an instruction breakpoint. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. ebrk?xternal breakpoint interrupt this bit is set as a result of the assertion of an external breakpoint. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. dpi?evelopment port interrupt this bit is set by the development port as a result of a debug station nonmaskable request or when entering debug mode immediately out of reset. results in debug mode entry if debug mode is enabled and the corresponding enable bit is set. the reason for entering debug mode is provided by the interrupt cause register. all bits are set by the hardware, cleared when the register is read, and cleared to zero when exiting reset. any attempt to write to this register is ignored. 18.5.3.2 debug enable register. this register has a reset value of 0x2002000. bits 0, 4, and 5?eserved these bits are reserved and should be set to 0. rste?eset interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. der bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field res rste chstp e mcie reserved extie alie prie fpuvi e decie reserved sysie tre res bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field res seie itlbms e itlber e dtlbms e dtlber e reserved lbrke ibrke ebrke dpie
development support 18-54 mpc801 user? manual motorola 18 chstpe?heck stop enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). mcie?achine check interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. extie?xternal interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. alie?lignment interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. prie?rogram interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. fpuvie?loating-point unavailable interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. decie?ecrementer interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. bits 11?2 and 15?6?eserved these bits are reserved and should be set to 0. sysie?ystem call interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. tre?race interrupt enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). seie?oftware emulation interrupt enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. itlbmse?mplementation specific instruction tlb miss enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled.
development support motorola mpc801 user? manual 18-55 18 itlbere?mplementation specific instruction tlb error enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. dtlbmse?mplementation specific data tlb miss enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. dtlbere?mplementation specific data tlb error enable 0 = debug mode entry is disabled (reset value). 1 = debug mode entry is enabled. bits 22?7?eserved these bits are reserved and should be set to 0. lbrke?oad/store breakpoint interrupt enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). ibrke?nstruction breakpoint interrupt enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). ebrke?xternal breakpoint interrupt enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). dpie?evelopment port nonmaskable request enable 0 = debug mode entry is disabled. 1 = debug mode entry is enabled (reset value). the debug enable register enables allows the enabling of events that cause the processor to enter into debug mode. 18.5.4 development port data register this 32-bit special-purpose register physically resides in the development port logic. it is used for data interchange between the core and development system. an access to this register is initiated using the mtspr and mfspr instructions and it is implemented using a special bus cycle on the internal bus. for details, see table 6-9.
development support 18-56 mpc801 user? manual motorola 18
motorola mpc801 user? manual 19-1 19 section 19 ieee 1149.1 test access port the mpc801 provides a dedicated user-accessible test access port that is fully compatible with the ieee 1149.1 standard test access port and boundary scan architecture . problems associated with testing high-density circuit boards have led to the development of this proposed standard under the sponsorship of the test technology committee of ieee and the joint test action group (jtag). the mpc801 implementation supports circuit board test strategies based on this standard. the test access port (tap) consists of five dedicated signal pins, a 16-state tap controller, and two test data registers. a boundary scan register links all the device signal pins into a single shift register. the test logic, which is implemented using static logic design, is independent of the device system logic. the mpc801 gives you the capability to: perform boundary scan operations to check circuit board electrical continuity. bypass the mpc801 for a given circuit board test by effectively reducing the boundary scan register to a single cell. sample the mpc801 system pins during operation and transparently shift out the result in the boundary scan register. disable the output drive to pins during circuit board testing. note certain precautions must be observed to ensure that the ieee 1149.1-like test logic does not interfere with nontest operation. refer to section 19.5 nonscan chain operation for details.
ieee 1149.1 test access port 19-2 mpc801 user? manual motorola 19 the mpc801? jtag includes a tap controller, a 4-bit instruction register, and two test registers (a 1-bit bypass register and a 316-bit boundary scan register). the tap controller consists of the following signals: tck? test clock input to synchronize the test logic. tms? test mode select input (with an internal pull-up resistor) that is sampled on the rising edge of tck to sequence the tap controller? state machine. tdi? test data input (with an internal pull-up resistor) that is sampled on the rising edge of tck. tdo? three-stateable test data output that is actively driven in the shift-ir and shift-dr controller states. tdo changes on the falling edge of tck. trst ?n asynchronous reset with an internal pull-up resistor that provides tap controller initialization and other logic required by the standard. an overview of the mpc801 scan chain implementation is illustrated in the figure below. figure 19-1. test logic block diagram boundary scan register bypass m u x instruction apply & decode register 4?it instruction register m u x tdo tdi tms tck trst 0 1 2 tap controller 3
ieee 1149.1 test access port motorola mpc801 user? manual 19-3 19 19.1 the tap controller the tap controller is responsible for interpreting the sequence of logical values on the tms signal. it is a synchronous state machine that controls the operation of the jtag logic. the value shown adjacent to each bubble in the figure below represents the value of the tms signal sampled on the rising edge of the tck signal. figure 19-2. tap controller state machine test logic reset run?est/idle select?r_scan capture?r shift?r exit1?r pause?r exit2?r update?r select?r_scan capture?r shift?r exit1?r pause?r exit2?r update?r 00 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1
ieee 1149.1 test access port 19-4 mpc801 user? manual motorola 19 19.2 the boundary scan register the mpc801 scan chain implementation has a 316-bit boundary scan register that contains bits for all device signal, clock pins, and associated control signals. however, the xtal, extal, and xfc pins are associated with analog signals and are not included in the boundary scan register. an ieee-1149.1-compliant boundary scan register has been included on the mpc801. this 316-bit boundary scan register can be connected between the tdi and tdo pins when extest or sample/preload instructions are selected. it is used for capturing signal pin data on the input pins, forcing fixed values on the output signal pins, and selecting the direction and drive characteristics (a logic value or high impedance) of the bidirectional and three-state signal pins. figures 19-3 through 19-6 illustrate the various cell types. figure 19-3. output pin cell (o.pin) figure 19-4. observe-only input pin cell (i.obs) 1 1 mux g1 1 1 mux g1 c d c d from last cell clock dr update dr shift dr 1 ?extest | clamp data from to output buffer 0 ?otherwize logic system to next cell 1 1 mux g1 c d from last cell clock dr data to system logic input pin shift dr to next cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-5 19 figure 19-5. output control cell (io.ctl) figure 19-6. general arrangement of bidirectional pin cells the value of the control bit controls the output function of the bidirectional pin. one or more bidirectional data cells can be serially connected to a control cell. bidirectional pins include two scan cell for data (io.cell) as illustrated in figure 19-6 and these bits are controlled by the cell illustrated in figure 19-5. 1 1 mux g1 1 1 mux g1 c d c d from last cell clock dr update dr shift dr 1 ?extest | clamp to output buffer 0 ?otherwize to next cell output control logic from system i/o pin from last cell output data input data output enable i.obs en from system logic o.pin i/o.ctl to next pin pair to next cell
ieee 1149.1 test access port 19-6 mpc801 user? manual motorola 19 it is important to know the boundary scan bit order and the pins that are associated with them. the bit order starting with the tdo output and ending with the tdi input is shown in table 19-1. the first column of the table defines the bit? ordinal position in the boundary scan register. the shift register cell nearest tdo (first to be shifted in) is defined as bit 1 and the last bit to be shifted in is bit 316. the second column references one of the three mpc801 cell types depicted in figures 19-3 through 19-6 that describe the cell structure for each type. the third column lists the pin name for all pin-related cells and defines the name of the bidirectional control register bits. the fourth column lists the pin type and the last column indicates the associated boundary scan register control bit for the bidirectional output pins. table 19-1. boundary scan bit definition bit cell type pin/cell name pin type output ctl cell 0 i.obs pb[26] i/o 1 o.pin pb[26] i/o g56.ctl 2 io.ctl g56.ctl 3 i.obs pb[27] i/o 4 o.pin pb[27] i/o g57.ctl 5 io.ctl g57.ctl 6 i.obs pb[28] i/o 7 o.pin pb[28] i/o g58.ctl 8 io.ctl g58.ctl 9 i.obs pb[29] i/o 10 o.pin pb[29] i/o g59.ctl 11 io.ctl g59.ctl 12 i.obs pb[30] i/o 13 o.pin pb[30] i/o g60.ctl 14 io.ctl g60.ctl 15 i.obs pb[31] i/o 16 o.pin pb[31] i/o g61.ctl 17 io.ctl g61.ctl 18 i.obs a[6] i/o 19 o.pin a[6] i/o g203.ctl 20 i.obs a[7] i/o
ieee 1149.1 test access port motorola mpc801 user? manual 19-7 19 21 o.pin a[7] i/o g203.ctl 22 io.ctl g203.ctl 23 i.obs a[8] i/o 24 o.pin a[8] i/o g202.ctl 25 io.ctl g202.ctl 26 i.obs a[9] i/o 27 o.pin a[9] i/o g202.ctl 28 i.obs a[10] i/o 29 o.pin a[10] i/o g202.ctl 30 i.obs a[11] i/o 31 o.pin a[11] i/o g202.ctl 32 i.obs a[12] i/o 33 o.pin a[12] i/o g202.ctl 34 i.obs a[13] i/o 35 o.pin a[13] i/o g202.ctl 36 i.obs a[14] i/o 37 o.pin a[14] i/o g202.ctl 38 i.obs a[15] i/o 39 o.pin a[15] i/o g202.ctl 40 i.obs a[16] i/o 41 o.pin a[16] i/o g201.ctl 42 io.ctl g201.ctl 43 i.obs a[17] i/o 44 o.pin a[17] i/o g201.ctl 45 i.obs a[27] i/o 46 o.pin a[27] i/o g201.ctl 47 i.obs a[19] i/o 48 o.pin a[19] i/o g201.ctl 49 i.obs a[20] i/o table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-8 mpc801 user? manual motorola 19 50 o.pin a[20] i/o g201.ctl 51 i.obs a[21] i/o 52 o.pin a[21] i/o g201.ctl 53 i.obs a[29] i/o 54 o.pin a[29] i/o g201.ctl 55 i.obs a[23] i/o 56 o.pin a[23] i/o g201.ctl 57 i.obs a[24] i/o 58 o.pin a[24] i/o g200.ctl 59 io.ctl g200.ctl 60 i.obs a[25] i/o 61 o.pin a[25] i/o g200.ctl 62 i.obs a[30] i/o 63 o.pin a[30] i/o g200.ctl 64 i.obs a[18] i/o 65 o.pin a[18] i/o g200.ctl 66 i.obs a[28] i/o 67 o.pin a[28] i/o g200.ctl 68 i.obs a[22] i/o 69 o.pin a[22] i/o g200.ctl 70 i.obs a[26] i/o 71 o.pin a[26] i/o g200.ctl 72 i.obs a[31] i/o 73 o.pin a[31] i/o g200.ctl 74 i.obs tsiz0 i/o 75 o.pin tsiz0 i/o g204.ctl 76 i.obs tsiz1 i/o 77 o.pin tsiz1 i/o g204.ctl 78 io.ctl g204.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-9 19 79 i.obs spare1 i/o 80 o.pin spare1 i/o g87.ctl 81 io.ctl g87.ctl 82 o.pin we0 _b_bsab0 _b o 83 o.pin we1 _b_bsab1 _b o 84 o.pin we2 _b_bsab2 _b o 85 o.pin we3 _b_bsab3 _b o 86 o.pin gpla0 _b_gplb0 _b o 87 o.pin oe _b_gplab1 _b o 88 o.pin gplab2 _b_cs2 _b o 89 o.pin gplab3 _b_cs3 _b o 90 o.pin cs4 _b o 91 o.pin cs5 _b o 92 o.pin cs6 o 93 o.pin cs7 o 94 o.pin cs3 _b o 95 o.pin cs2 _b o 96 o.pin cs1 _b o 97 o.pin cs0 _b o 98 i.obs wr_b i/o 99 o.pin wr_b i/o g96.ctl 100 io.ctl g96.ctl 101 i.obs gplb4 _b_upwaitb_b i/o 102 o.pin gplb4 _b_upwaitb_b i/o g24.ctl 103 io.ctl g24.ctl 104 o.pin gpla5 _b o 105 i.obs gpla4 _b_upwaita_a i/o 106 o.pin gpla4 _b_upwaita_a i/o g25.ctl 107 io.ctl g25.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-10 mpc801 user? manual motorola 19 108 o.pin bdip _b_gplb5 _b o 109 i.obs bi _b i/o 110 o.pin bi _b i/o g23.ctl 111 io.ctl g23.ctl 112 i.obs ta _b i/o 113 o.pin ta _b i/o g22.ctl 114 io.ctl g22.ctl 115 i.obs tea _b i/o 116 o.pin tea _b i/o g89.ctl 117 io.ctl g89.ctl 118 i.obs ts _b i/o 119 o.pin ts _b i/o g97.ctl 120 io.ctl g97.ctl 121 i.obs br _b i/o 122 o.pin br _b i/o g21.ctl 123 io.ctl g21.ctl 124 i.obs bg _b i/o 125 o.pin bg _b i/o g20.ctl 126 io.ctl g20.ctl 127 i.obs bb _b i/o 128 o.pin bb _b i/o g11.ctl 129 io.ctl g11.ctl 130 i.obs spare4 i/o 131 o.pin spare4 i/o g86.ctl 132 io.ctl g86.ctl 133 i.obs frz_b_irq6 _b i/o 134 o.pin frz_b_irq6 _b i/o g90.ctl 135 io.ctl g90.ctl 136 i.obs cr_b_irq3 _b i table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-11 19 137 i.obs burst _b i/o 138 o.pin burst _b i/o g205.ctl 139 io.ctl g205.ctl 140 i.obs rsv_b_irq2 _b i/o 141 o.pin rsv_b_irq2 _b i/o g17.ctl 142 io.ctl g17.ctl 143 i.obs lwp1_vf1 i/o 144 o.pin lwp1_vf1 i/o g15.ctl 145 io.ctl g15.ctl 146 i.obs lwp0_vf0 i/o 147 o.pin lwp0_vf0 i/o g150.ctl 148 io.ctl g150.ctl 149 i.obs iwp2_vf2 i/o 150 o.pin iwp2_vf2 i/o g15.ctl 151 i.obs iwp1_vfls1 i/o 152 o.pin iwp1_vfls1 i/o g150.ctl 153 i.obs iwp0_vfls0 i/o 154 o.pin iwp0_vfls0 i/o g150.ctl 155 i.obs ptr_at3 i/o 156 o.pin ptr_at3 i/o g13.ctl 157 io.ctl g13.ctl 158 i.obs at2 i/o 159 o.pin at2 i/o g41.ctl 160 io.ctl g41.ctl 161 i.obs dsck_at1 i/o 162 o.pin dsck_at1 i/o g16.ctl 163 io.ctl g16.ctl 164 i.obs dsdi_irq5_b i/o 165 o.pin dsdi_irq5_b i/o g14.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-12 mpc801 user? manual motorola 19 166 io.ctl g14.ctl 167 i.obs kr _b_irq4 _b i/o 168 o.pin kr _b_irq4 _b i/o g95.ctl 169 io.ctl g95.ctl 170 i.obs as _b i/o 171 o.pin as _b i/o g82.ctl 172 io.ctl g82.ctl 173 i.obs baddr[30] i/o 174 o.pin baddr[30] i/o g83.ctl 175 io.ctl g83.ctl 176 i.obs modck1_sts _b i/o 177 o.pin modck1_sts _b i/o g92.ctl 178 io.ctl g92.ctl 179 i.obs modck2_dsdo i/o 180 o.pin modck2_dsdo i/o g91.ctl 181 io.ctl g91.ctl 182 i.obs baddr[29] i/o 183 o.pin baddr[29] i/o g84.ctl 184 io.ctl g84.ctl 185 i.obs baddr[28] i/o 186 o.pin baddr[28] i/o g85.ctl 187 io.ctl g85.ctl 188 i.obs clk4in i 189 o.pin texp o 190 i.obs hreset _b i/o 191 o.pin hreset _b i/o g94.ctl 192 io.ctl g94.ctl 193 i.obs sreset _b i/o 194 o.pin sreset _b i/o g93.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-13 19 195 io.ctl g93.ctl 196 i.obs rstconf _b i 197 i.obs poreset _b i 198 o.pin clkout o 199 i.obs dp0_irq3 _b i/o 200 o.pin dp0_irq3 _b i/o g18.ctl 201 i.obs dp3_irq6 _b i/o 202 o.pin dp3_irq6 _b i/o g18.ctl 203 io.ctl g18.ctl 204 i.obs dp2_irq5 _b i/o 205 o.pin dp2_irq5 _b i/o g18.ctl 206 i.obs dp1_irq4 _b i/o 207 o.pin dp1_irq4 _b i/o g18.ctl 208 i.obs d[31] i/o 209 o.pin d[31] i/o g103.ctl 210 io.ctl g103.ctl 211 i.obs d[30] i/o 212 o.pin d[30] i/o g103.ctl 213 i.obs d[29] i/o 214 o.pin d[29] i/o g103.ctl 215 i.obs d[28] i/o 216 o.pin d[28] i/o g103.ctl 217 i.obs d[7] i/o 218 o.pin d[7] i/o g103.ctl 219 i.obs d[26] i/o 220 o.pin d[26] i/o g103.ctl 221 i.obs d[25] i/o 222 o.pin d[25] i/o g103.ctl 223 i.obs d[24] i/o table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-14 mpc801 user? manual motorola 19 224 o.pin d[24] i/o g103.ctl 225 i.obs d[6] i/o 226 o.pin d[6] i/o g102.ctl 227 io.ctl g102.ctl 228 i.obs d[22] i/o 229 o.pin d[22] i/o g102.ctl 230 i.obs d[21] i/o 231 o.pin d[21] i/o g102.ctl 232 i.obs d[20] i/o 233 o.pin d[20] i/o g102.ctl 234 i.obs d[19] i/o 235 o.pin d[19] i/o g102.ctl 236 i.obs d[18] i/o 237 o.pin d[18] i/o g102.ctl 238 i.obs d[5] i/o 239 o.pin d[5] i/o g102.ctl 240 i.obs d[16] i/o 241 o.pin d[16] i/o g102.ctl 242 i.obs d[15] i/o 243 o.pin d[15] i/o g101.ctl 244 io.ctl g101.ctl 245 i.obs d[14] i/o 246 o.pin d[14] i/o g101.ctl 247 i.obs d[3] i/o 248 o.pin d[3] i/o g101.ctl 249 i.obs d[2] i/o 250 o.pin d[2] i/o g101.ctl 251 i.obs d[11] i/o 252 o.pin d[11] i/o g101.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-15 19 253 i.obs d[10] i/o 254 o.pin d[10] i/o g101.ctl 255 i.obs d[9] i/o 256 o.pin d[9] i/o g101.ctl 257 i.obs d[1] i/o 258 o.pin d[1] i/o g101.ctl 259 i.obs d[27] i/o 260 o.pin d[27] i/o g100.ctl 261 io.ctl g100.ctl 262 i.obs d[23] i/o 263 o.pin d[23] i/o g100.ctl 264 i.obs d[17] i/o 265 o.pin d[17] i/o g100.ctl 266 i.obs d[4] i/o 267 o.pin d[4] i/o g100.ctl 268 i.obs d[13] i/o 269 o.pin d[13] i/o g100.ctl 270 i.obs d[12] i/o 271 o.pin d[12] i/o g100.ctl 272 i.obs d[8] i/o 273 o.pin d[8] i/o g100.ctl 274 i.obs d[0] i/o 275 o.pin d[0] i/o g100.ctl 276 i.obs irq0 _b i 277 i.obs irq1 _b i 278 i.obs irq7 _b i 279 i.obs spare3 i/o 280 o.pin spare3 i/o g10.ctl 281 io.ctl g110.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-16 mpc801 user? manual motorola 19 282 i.obs pb[16] i/o 283 o.pin pb[16] i/o g40.ctl 284 io.ctl g40.ctl g40.ctl 285 i.obs pb[17] i/o 286 o.pin pb[17] i/o g47.ctl 287 io.ctl g47.ctl g47.ctl 288 i.obs pb[18] i/o 289 o.pin pb[18] i/o g48.ctl 290 io.ctl g48.ctl g48.ctl 291 i.obs pb[19] i/o 292 o.pin pb[19] i/o g49.ctl 293 io.ctl g49.ctl g49.ctl 294 i.obs pb[20] i/o 295 o.pin pb[20] i/o g50.ctl 296 io.ctl g50.ctl g50.ctl 297 i.obs pb[21] i/o 298 o.pin pb[21] i/o g51.ctl 299 io.ctl g51.ctl g51.ctl 300 i.obs pb[22] i/o 301 o.pin pb[22] i/o g52.ctl 302 io.ctl g52.ctl g52.ctl 303 i.obs pb[23] i/o 304 o.pin pb[23] i/o g53.ctl 305 io.ctl g53.ctl g53.ctl 306 i.obs pb[24] i/o 307 o.pin pb[24] i/o g54.ctl 308 io.ctl g54.ctl g54.ctl 309 i.obs pb[25] i/o 310 o.pin pb[25] i/o g55.ctl table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port motorola mpc801 user? manual 19-17 19 19.3 the instruction register the mpc801 jtag implementation includes the public instructions ( extest , sample/ preload , and bypass ) and also supports the clamp instruction. one additional public instruction ( hi-z ) is capable of disabling all device output drivers. the mpc801 includes a 4-bit instruction register (no parity) that consists of a shift register with four parallel outputs. data is transferred from the shift register to the parallel outputs during the update-ir controller state. the four bits are used to decode the five unique instructions listed in table 19-2. the parallel output of the instruction register is reset to all ones in the test-logic-reset controller state. this preset state is equivalent to the bypass instruction. during the capture-ir controller state, the parallel inputs to the instruction shift register are loaded with the clamp command code. 311 io.ctl g55.ctl g55.ctl 312 i.obs spare2 i/o 313 o.pin spare2 i/o g88.ctl 314 io.ctl g88.ctl g88.ctl table 19-2. instruction decoding code instruction b3 b2 b1 b0 0000 extest 0001 sample/preload 0x1x bypass 0100 hi-z 0101 clamp and bypass note: b0 (lsb) is shifted first. table 19-1. boundary scan bit definition (continued) bit cell type pin/cell name pin type output ctl cell
ieee 1149.1 test access port 19-18 mpc801 user? manual motorola 19 19.3.1 the external test instruction the external test ( extest ) instruction selects the 316-bit boundary scan register and asserts an internal reset for the mpc801 system logic to force a known beginning internal state while performing external boundary scan operations. by using the tap controller, the register is capable of scanning user-defined values into the output buffers, capturing values presented to the input pins, and controlling the output drive of three-stateable output or bidirectional pins. for more details on the function and use of extest , refer to the ieee 1149.1 standard. 19.3.2 the sample/preload instruction the sample/preload instruction initializes the boundary scan register output cells before extest is selected. this initialization ensures that known data will appear on the outputs when entering the extest instruction. the sample/preload instruction also provides an opportunity to obtain a snapshot of system data and control signals. note since there is no internal synchronization between the tck and clkout pins, you must provide some form of external synchronization between the jtag operation tck frequency and system operation clkout frequency to achieve meaningful results. 19.3.3 the bypass instruction the bypass instruction creates a shift register path from the tdi pin to the bypass register and, finally, to the tdo pin, thus circumventing the 316-bit boundary scan register. this instruction is used to enhance test efficiency when a component other than the mpc801 is the device being tested. it selects the single-bit bypass register as illustrated in figure 19-7. figure 19-7. bypass register when the bypass register is selected by the current instruction, the shift register stage is set to a logic zero on the rising edge of the tck pin in the capture-dr controller state. therefore, the first bit to be shifted out after selecting the bypass register is always a logic zero. 1 1 mux g1 c d to tdo from tdi 0 shift dr clock dr
ieee 1149.1 test access port motorola mpc801 user? manual 19-19 19 19.3.4 the clamp instruction the clamp instruction selects the single-bit bypass register as illustrated in figure 19-7 above, and the state of all signals driven from the system output pins is completely defined by the data previously shifted into the boundary scan register by using the sample/preload instruction. 19.3.5 the hi-z instruction the hi-z instruction is provided as a manufacturer? optional public instruction to avoid back driving the output pins during circuit board testing. when hi-z is invoked, all output drivers (including the two-state drivers) are turned off (high impedance) and the instruction selects the bypass register. 19.4 mpc801 restrictions the control afforded by the output enable signals using the boundary scan register and the extest instruction requires a compatible circuit board test environment to avoid device-destructive configurations. you must avoid situations in which the mpc801 output drivers are enabled into actively driven networks. the mpc801 cc features a low-power stop mode. the interaction of the scan chain interface with low-power stop mode has the following characteristics: the tap controller must be in the test-logic-reset state to either enter or remain in the low-power stop mode. leaving the tap controller in the test-logic-reset state negates its ability to achieve low-power, but does not otherwise affect device functionality. the tck input is not disabled in low-power stop mode. to consume minimal power, the tck input should be externally connected to v cc or ground while in low-power or normal mode (nonscan chain). the tms, tdi, and trst pins include on-chip pull-up resistors. in low-power stop mode, these two pins should remain either unconnected or connected to v cc to achieve minimal power consumption. for proper reset of the scan chain test logic, the best approach is to pull active trst at power-on reset. the easiest way to reset the scan chain logic is to connect trst to hreset , sreset , or poreset . 19.5 nonscan chain operation in nonscan chain operation, there are two constraints. first, the tck input does not include an internal pull-up resistor and should be tied high or low to preclude mid-level inputs. the second constraint is that the scan chain test logic must be kept transparent to the system logic by forcing tap into the test-logic-reset controller state by using one of two methods. the first method is to connect the trst pin to logic 0 (or one of the reset pins). the second method is to assure the tms pin is sampled as a logic one for five consecutive tck rising edges. if the tms pin remains connected to v cc or does not change state, then the tap controller cannot leave the test-logic-reset state, regardless of the tck pin? state. 19.6 motorola mpc801 bsdl description the bsdl file for exercising the scan chain logic on the mpc801 is available at the motorola web site ( www.mot.com/netcomm ) in the mpcxxx embedded powerpc area.
ieee 1149.1 test access port 19-20 mpc801 user? manual motorola 19
motorola mpc801 user? manual 20-1 20 section 20 electrical characteristics this section contains detailed information on the power considerations, dc/ac electrical characteristics, and ac timing specifications for the mpc801. note the mpc801 electrical specifications are preliminary and many specs are from design simulations. these specifications may not be fully tested or guaranteed at this early stage of the product life cycle. finalized specifications will be published after thorough characterization and device qualifications have been completed. 20.1 maximum ratings (gnd = 0v) rating symbol value unit supply voltage vddh -0.3 to 4.0 v vdd -0.3 to 4.0 v kapwr -0.3 to 4.0 v vddsyn -0.3 to 4.0 v input voltage vin gnd-0.3 to 5.8 v operating temperature range t a 0 to 70 or -40 to 85 ?c storage temperature range t stg -55 to +150 ?c notes 1. functional operating conditions are given in section 20.3 power considerations . absolute maximum ratings are stress ratings only and functional operation at the maximum is not guaranteed. stress beyond those listed may affect device reliability or cause permanent damage to the device. 2. caution : all ? volt friendly input voltages cannot be more than 2.5 v greater than supply voltage. this restriction applies to power-on as well as normal operation. 3. ? volt friendly inputs are inputs that tolerate 5 volts.
electrical characteristics 20-2 mpc801 user? manual motorola 20 this device contains circuitry that protects against damage from high static voltage or electrical fields. however, it is advised that precautions be taken to avoid application of any voltages higher than the maximum-rated voltages to this high-impedance circuit. reliability of operation is enhanced if unused inputs are tied to an appropriate logic voltage level (either gnd or v cc ). 20.2 thermal characteristics 20.3 power considerations the average chip-junction temperature , t j , in c can be obtained from t j = t a + (p d ? q ja ) (1) where t a = ambient temperature , c q ja = package thermal resistance , junction to ambient , c/w p d =p int + p i/o p int =i dd x v dd , watts?hip internal power p i/o = power dissipation on input and output pins?ser determined for most applications p i/o < 0.3 p int and can be neglected. if p i/o is neglected , an approximate relationship between p d and t j is: p d =k (t j + 273 c) (2) characteristic symbol value unit thermal resistance for bga q jc -30 1 c/w q ja 30 2 c/w q ja 15 3 c/w notes: 1. assumes natural convection, a multilayer board with thermal vias, 1 watt mpc801 dissipation, and a board temperature rise of 20 c above ambient. 2. assumes natural convection, a multilayer board with thermal vias,1 watt mpc801 dissipation, and a board temperature rise of 10 c above ambient. for more information on the design of thermal vias on multilayer boards and bga layout considerations in general, refer to an-1231/d, plastic ball grid array application note available from your local motorola sales office. t j = t a + (p d q ja ) p d = (v dd i dd ) + p i/o where: p i/o is the power dissipation on pins.
electrical characteristics motorola mpc801 user? manual 20-3 20 solving equations (1) and (2) for k gives k = p d (t a + 273 c) + q ja ?p d 2 (3) where k is a constant pertaining to the particular part. k can be determined from equation (3) by measuring p d (at equilibrium) for a known t a . using this value of k , the values of p d and t j can be obtained by solving equations (1) and (2) iteratively for any value of t a . 20.3.1 layout practices each v cc pin on the mpc801 should be provided with a low-impedance path to the board? supply. each gnd pin should likewise be provided with a low-impedance path to ground. the power supply pins drive distinct groups of logic on chip. the v cc power supply should be bypassed to ground using at least four 0.1 m f by-pass capacitors located as close as possible to the four sides of the package. the capacitor leads and associated printed circuit traces connecting to chip v cc and gnd should be kept to less than half an inch per capacitor lead. a four-layer board is recommended, employing two inner layers as v cc and gnd planes. all output pins on the mpc801 have fast rise and fall times. printed circuit (pc) trace interconnection length should be minimized in order to minimize undershoot and reflections caused by these fast output switching times. this recommendation particularly applies to the address and data busses. maximum pc trace lengths of six inches are recommended. capacitance calculations should consider all device loads as well as parasitic capacitances due to the pc traces. attention to proper pcb layout and bypassing becomes especially critical in systems with higher capacitive loads because these loads create higher transient currents in the v cc and gnd circuits. pull up all unused inputs or signals that will be inputs during reset. special care should be taken to minimize the noise levels on the pll supply pins.
electrical characteristics 20-4 mpc801 user? manual motorola 20 20.4 dc electrical specifications (v cc = 3.0 ?3.6v) characteristic symbol min max unit input high voltage (all inputs except extal and extclk) vih 2.0 5.5 v input low voltage vil gnd 0.8 v extal, extclk input high voltage vihc 0.7*(vcc) vcc+0.3 v input leakage current, vin = 5.5 v i in tbd ma hi-z (off state) leakage current, vin = tbd v i oz tbd ma signal low input current, v il = 0.8 v i l tbd tbd ma signal high input current, v ih = 2.0 v i h tbd tbd ma output high voltage, ioh = -2.0 ma, vddh = 3.0 v except xtal, xfc, and open-drain pins voh 2.4 v output low voltage iol = 2.0 ma clkout iol = 3.2 ma a[6:31], tsiz0, tsiz1, d[0:31], dp[0:3]/irq [3:6], rd/wr , burst , rsv /irq2 , iwp[0:1]/vfls[0:1], at2, iwp2/vf2, iwp0/vf0, lwp1/vf1, dsdi/irq5 , ptr /at3, spisel /pb31, spiclk/pb30, spimosi/pb29, spimiso/pb28, i2csda/ pb27, i2cscl/pb26, ugpio1/pb25, ugpio2/pb24, ucts1 / pb23, ucts2 /pb22, urxd1/pb21, urxd2/pb20, urts1 / pb19, urts2 /pb18, utxd1/pb17, utxd2/pb16 iol = 5.3 ma bdip /gplb (5), br , bg , frz/irq6 , cs [0:5], cs (6), cs (7), we0 /bs_ab0 , we1 /bs_ab1 , we2 /bs_ab2 , we3 /bs_ab3 , gpla0 /gplb0 , oe /gpla1 /gplb1 , gpla [2:3]/ gplb [2:3]/cs [2:3], upwaita/gpla4 , upwaitb/gplb4 , gpla5 , dsck/at1, modck1/sts , modck2/dsdo , baddr[28:30] iol = 8.9 ma ts , ta , tea , bi , bb , hreset , sreset vol 0.5 v
electrical characteristics motorola mpc801 user? manual 20-5 20 20.5 mpc801 ac electrical specifications control timing clkout outputs inputs inputs 2.0v 0.8v 2.0v 2.0v 0.8v 0.8v 2.0v 2.0v 0.8v 0.8v 2.0v 2.0v 0.8v 0.8v 2.0v a b c c d a = maximum output delay specification b = minimum output hold time c = minimum input setup time specification d = minimum input hold time specification outputs 2.0v 0.8v 0.8v 2.0v a b 0.8v d
electrical characteristics 20-6 mpc801 user? manual motorola 20 table 20-1. bus operation timing num characteristic expression 25 mhz 40 mhz unit min max min max b1 clkout period tc ns b2 clock pulse width low ns b3 clock pulse width high ns b4 clkout rise time ns b5 clkout fall time ns b6 circuit parameter tcc 9 6 ns b7 clkout to a(6:31), rd/wr , burst , d(0:31), dp(0:3) invalid 0.25tc + 1 10 5 ns b8 clkout to tsiz(0:1),rsv , at(0:3),bdip , ptr , baddr(28:30) invalid 0.25tc + 1 10 5 ns b9 clkout to br , bg , frz, vfls(0:1), vf(0:2), iwp(0:2), lwp(0:1), sts invalid 1 0.25tc + 1 10 5 ns b10 clkout to a(6:31), rd/wr , burst , d(0:31), dp(0:3) valid 0.25tc + tcc 10 19 13 ns b11 clkout to tsiz(0:1),rsv , at(0:3), bdip , ptr valid 0.25tc + tcc 10 19 13 ns b12 clkout to br , bg , vfls(0:1), vf(0:2), iwp(0:2), frz, lwp(0:1), sts valid. 1 0.25tc + tcc 10 19 13 ns b13 clkout to a(6:31), rd/wr , burst , d(0:31), tsiz(0:1), rsv , at(0:3), ptr hi-z 0.25tc + tcc 10 19 5 13 ns b14 clkout to ts , bb assertion 0.25tc + tcc 10 19 5 13 ns b15 clkout to ta , bi assertion (when driven by the memory controller) 11?0ns b16 clkout to ts , bb negation 0.25tc + tcc 10 19 5 13 ns b17 clkout to ta , bi negation (when driven by the memory controller) 11?1ns b18 clkout to ts , bb hi-z 0.25tc +14 10 24 5 21 ns b19 clkout to ta , bi hi-z (when driven by the memory controller) 15?5ns b20 clkout to tea assertion 11 11 ns b21 clkout to tea hi-z 15 15 ns b22a clkout falling edge to cs asserted-gpcm- acs=10, trlx=0 tcc + 1 10 8 ns b22b clkout falling edge to cs asserted-gpcm- acs=11, trlx=0, ebdf=1 0.25tc + tcc + 1 10 20 5 13 ns b22c clkout falling edge to cs asserted-gpcm- acs=11, trlx=0, ebdf=1 0.375tc + tcc + 1 14 25 7 16 ns b22 ta , bi , bb , bg , br valid to clkout (setup time) 2 3 9?ns
electrical characteristics motorola mpc801 user? manual 20-7 20 b22a tea , kr , retry , cr valid to clkout (setup time) 11?0ns b23 clkout to ta , tea , bi , bb , bg , br valid (hold time). 2 2?ns b23a clkout to kr , retry , cr valid (hold time) 2 2 ns b24 d(0:31), dp(0:3) valid to clkout rising edge (setup time). 4 6?ns b25 clkout rising edge to d(0:31), dp(0:3) valid (hold time). 4 2?ns b26 d(0:31), dp(0:3) valid to clkout falling edge (setup time) 5 4?ns b27 clkout falling edge to d(0:31), dp(0:3) valid (hold time) 5 2?ns b28a clkout falling edge to we (0:3) negated- gpcm-write access trlx=0, csnt=1, ebdf=0 0.25tc + tcc + 1 10 20 5 13 ns b28b clkout falling edge to cs negated-gpcm- write access trlx=0, csnt=1, acs=10, or acs=11, ebdf=0 0.25tc + tcc + 1 20 13 ns b28c clkout falling edge to we (0:3) negated- gpcm-write access trlx=0, csnt=1, ebdf=0 0.375tc + tcc + 1 14 25 7 16 ns b28d clkout falling edge to cs negated-gpcm- write access trlx=0, csnt=1, acs=10, or acs=11, ebdf=0 0.25tc + tcc + 1 25 16 ns b28 clkout rising edge to cs asserted -gpcm- acs = 00 0.25tc+tcc+1 10 20 5 13 ns b29a we (0:3) negated to d(0:31), dp(0:3) high z- gpcm- write access, trlx = ?? csnt = ?? ebdf=0 18 8 ns b29a clkout falling edge to cs asserted -gpcm- acs = 10, trlx = 0 tcc + 1 10 8 ns b29b clkout falling edge to cs asserted -gpcm- acs = 11, trlx = 0 0.25tc+tcc+1 10 20 5 13 ns b29b cs negated to d(0:31), dp(0:3) high z-gpcm- write access, acs=00, trlx=0, csnt=0 8?ns b29c cs negated to d(0:31), dp(0:3) high z-gpcm- write access, trlx=0, csnt=1, acs=10 or acs=11, ebdf=0 18 8 ns b29d we (0:3) negated to d(0:31), dp(0:3) high z- gpcm- write access,trlx = ?? csnt = ?? ebdf=0 58?8ns b29e cs negated to d(0:31), dp(0:3) high z-gpcm- write access, trlx=1, csnt=1, acs=10 or acs=11, ebdf=0 58?8ns b29f we (0:3) negated to d(0:31), dp(0:3) high z- gpcm- write access, trlx = ?? csnt = ?? ebdf=1 12 5 ns table 20-1. bus operation timing (continued) num characteristic expression 25 mhz 40 mhz unit min max min max
electrical characteristics 20-8 mpc801 user? manual motorola 20 b29g cs negated to d(0:31), dp(0:3) hi-z-gpcm-write access, trlx=0, csnt=1, acs=10 or acs=11, ebdf=1 52?4ns b29h we (0:3) negated to d(0:31), dp(0:3) hi-z-gpcm- write access,trlx = ?? csnt = ?? ebdf=1 52?4ns b29i cs negated to d(0:31), dp(0:3) hi-z-gpcm-write access, trlx=1, csnt=1, acs=10 or acs=11, ebdf=1 b29 clkout rising edge to cs negated -gpcm- read access tcc + 1 3 10 2 8 ns b30 a(6:31) to cs asserted -gpcm- acs = 10, trlx = 0 8?ns b30a a(6:31) to cs asserted -gpcm- acs = 11, trlx = 0 18 8 ns b31 clkout rising edge to oe , we (0:3) asserted 11 9 ns b32 clkout rising edge to oe negated 3 11 2 9 ns b33 a(6:31) to cs asserted -gpcm- acs = 10, trlx = 1 48?3ns b33a a(6:31) to cs asserted -gpcm- acs = 11, trlx = 1 58?8ns b34 clkout rising edge to we (0:3) negated - gpcm-write access csnt = ? ?1 9 ns b34a clkout falling edge to we (0:3) negated - gpcm-write access trlx = ?? csnt = ?? 0.25tc + tcc + 1 10 20 5 13 ns b34b clkout falling edge to cs negated-gpcm- write access trlx = ?? csnt = ?? acs = ?0?or acs=?1 0.25tc + tcc + 1 20 13 ns b35 we (0:3) negated to d(0:31), dp(0:3) hi-z-gpcm- write access, csnt = ? 8?ns b35a we (0:3) negated to d(0:31), dp(0:3) hi-z-gpcm- write access,trlx = ?? csnt = ? 18 8 ns b35b cs negated to d(0:31), dp(0:3) hi-z -gpcm- write access, acs = ?0? trlx = ??& csnt = ? 8?ns b35c cs negated to d(0:31), dp(0:3) hi-z -gpcm- write access,trlx = ?? csnt = ?? acs = ?0?or acs=?1 18 8 ns b35d we (0:3) negated to d(0:31), dp(0:3) hi-z -gpcm- write access,trlx = ?? csnt = ? 58?8ns b35e cs negated to d(0:31), dp(0:3) hi-z -gpcm- write access,trlx = ?? csnt = ?? acs = ?0? or acs=?1 58?8ns b36 cs , we (0:3) negated to a(6:31) invalid -gpcm- write access. 6 8?ns table 20-1. bus operation timing (continued) num characteristic expression 25 mhz 40 mhz unit min max min max
electrical characteristics motorola mpc801 user? manual 20-9 20 b36a we (0:3) negated to a(6:31) invalid -gpcm- write access, trlx=?? csnt = '1? cs negated to a(6:31) invalid -gpcm- write access, trlx=?? csnt = '1? acs = 10, acs = =?1 18 8 ns b36b we (0:3) negated to a(6:31) invalid -gpcm- write access, trlx=?? csnt = '1? cs negated to a(6:31) invalid -gpcm- write access, trlx=?? csnt = '1? acs = 10, acs = =?1 58?8ns b37 clkout falling edge to cs valid?s requested by control bit cst4 in the corresponding word in the upm tcc + 1 10 8 ns b37a clkout falling edge to cs valid?s requested by control bit cst1 in the corresponding word in the upm 0.25tc + tcc + 1 10 20 5 13 ns b37b clkout rising edge to cs valid?s requested by control bit cst2 in the corresponding word in the upm tcc + 1 10 8 ns b37c clkout rising edge to cs valid?s requested by control bit cst3 in the corresponding word in the upm 0.25tc + tcc + 1 10 20 5 13 ns b38 clkout falling edge to bs valid?s requested by control bit bst4 in the corresponding word in the upm tcc + 1 10 8 ns b38a clkout falling edge to bs valid?s requested by control bit bst1 in the corresponding word in the upm 0.25tc + tcc + 1 10 20 5 13 ns b38b clkout rising edge to bs valid?s requested by control bit bst2 in the corresponding word in the upm tcc + 1 10 8 ns b38c clkout rising edge to bs valid?s requested by control bit bst3 in the corresponding word in the upm 0.25tc + tcc + 1 10 20 5 13 ns b39 clkout falling edge to gpl valid?s requested by control bit gxt4 in the corresponding word in the upm tcc + 1 10 8 ns b39a clkout rising edge to gpl valid?s requested by control bit gxt3 in the corresponding word in the upm 0.25tc + tcc + 1 10 20 5 13 ns b40 a(6:31) to cs valid?s requested by control bit cst4 in the corresponding word in the upm 8?ns b40a a(6:31) to cs valid?s requested by control bit cst1 in the corresponding word in the upm 18 8 ns b40b a(6:31) to cs valid?s requested by control bit cst2 in the corresponding word in the upm 28?3ns b41 a(6:31) to bs valid?s requested by control bit bst4 in the corresponding word in the upm 8?ns b41a a(6:31) to bs valid?s requested by control bit bst1 in the corresponding word in the upm 18 8 ns table 20-1. bus operation timing (continued) num characteristic expression 25 mhz 40 mhz unit min max min max
electrical characteristics 20-10 mpc801 user? manual motorola 20 figure 20-1. external clock timing diagram b41b a(6:31) to bs valid?s requested by control bit bst2 in the corresponding word in the upm 28?3ns b42 a(6:31) to gpl valid?s requested by control bit gxt4 in the corresponding word in the upm 8?ns b43 upwait valid to clkout falling edge 7 6ns b44 clkout falling edge to upwait valid 7 1ns b45 as valid to clkout rising edge 9 7 ns b46 a(6:31), tsiz(0:1), rd/wr , burst , valid to clkout rising edge 9?ns b47 ts valid to clkout rising edge (setup time) 9 7 ns b48 clkout rising edge to ts valid (hold time) 2 2 ns b49 as negation to memory controller signals negation tbd tbd ns 1. the timing for br output is relevant when the mpc801 is selected to operate with an external bus arbiter. the timing for bg output is relevant when the mpc801 is selected to operate with an internal bus arbiter. 2. the setup times required for t a , tea and bi are relevant only when they are supplied by an external device and not when the memory controller drives them. 3. the timing required for br input is relevant when the mpc801 is selected to operate with an internal bus arbiter. the timing for bg input is relevant when the mpb801 is selected to operate with an external bus arbiter. 4. the d[0:31] and dp[0:3] input timings b18 and b19 refer to the rising edge of the clkout in which the ta input signal is asserted. 5. the d[0:31] and dp[0:3] input timings b20 and b21 refer to the falling edge of the clkout. this timing is valid only under the control of the upm in the memory controller. 6. the timing b30 refers to cs when acs = ?0 and to we [0:3] when csnt = ?? 7. the upwait signal is considered asynchronous to the clkout and is synchronized internally. the timings speci?d in b37 and b38 are speci?d to enable the freeze of the upm output signals. 8. the as signal is considered asynchronous to the clkout. the b39 timing is speci?d to allow the behavior illustrated in figure 8-18. table 20-1. bus operation timing (continued) num characteristic expression 25 mhz 40 mhz unit min max min max clkout b1 b1 b4 b3 b2 b5
electrical characteristics motorola mpc801 user? manual 20-11 20 figure 20-2. synchronous output signals timing diagram clkout output signals output signals b7 b8 b9 b7a b8a b7b b8b b9 output signals
electrical characteristics 20-12 mpc801 user? manual motorola 20 figure 20-3. synchronous active pull-up and open-drain outputs signals timing diagram figure 20-4. synchronous input signals timing diagram clkout ts , bb tea ta , bi b11 b13 b14 b12 b11a b12a b13a b15 clkout ta , bi , bb , tea , kr , b17a b16a b16 bg , br retry , cr b17
electrical characteristics motorola mpc801 user? manual 20-13 20 figure 20-5. input data in normal case timing diagram figure 20-6. input data timing when controlled by the upm in the memory controller clkout b17 b18 b19 b16 ta d[0:31], dp[0:3] b21 b20 ta d[0:31], d[0:3] clkout
electrical characteristics 20-14 mpc801 user? manual motorola 20 figure 20-7. external bus read timing diagram (gpcm controlled?cs = ?0? figure 20-8. external bus read timing diagram (gpcm controlled?rlx = ??acs = ?0? clkout b11 ts cs x oe we [0:3] d[0:31], dp[0:3] a[6:31] b8 b22 b28 b26 b18 b12 b23 b19 b25 clkout ts a[6:31] b11 cs x oe d[0:31], dp[0:3] b8 b12 b19 b25 b23 b22a b18 b24 b26
electrical characteristics motorola mpc801 user? manual 20-15 20 figure 20-9. external bus read timing diagram (gpcm controlled?rlx = ??acs = ?1? figure 20-10. external bus read timing diagram (gpcm controlled?rlx = ?? acs = ?0? acs = ?1? clkout ts a(6:31) b11 cs x oe d(0:31), dp(0:3) b8 b12 b26 b19 b25 b23 b22b b18 b24a b22c clkout ts a(6:31) cs x oe d(0:31), dp(0:3) b8 b22a b23 b18 b19 b27 b11 b27a b22b b12 b26 b22c
electrical characteristics 20-16 mpc801 user? manual motorola 20 figure 20-11. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? figure 20-12. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? clkout ts a(6:31) cs x we (0:3) d(0:31), dp(0:3) b8 oe b9 b12 b8 b11 b22 b28 b25 b30 b23 b29b b26 b29 clkout ts a(6:31) b11 cs x we (0:3) d(0:31), dp(0:3) oe b26 b25 b8 b29a b8 b9 b22 b28a b29c b23 b30a b12 b30c b28b b28d b29g b29f b28c
electrical characteristics motorola mpc801 user? manual 20-17 20 figure 20-13. external bus write timing diagram (gpcm controlled?rlx = ?? csnt = ?? clkout ts a(6:31) cs x we (0:3) d(0:31), dp(0:3) oe b12 b30b b23 b11 b8 b22 b25 b28b b28a b9 b26 b8 b29b b29h b29e b28c b29d b29i b28d b30d
electrical characteristics 20-18 mpc801 user? manual motorola 20 figure 20-14. external bus timing diagram (upm controlled signals) clkout a(6:31) b31 cs x bs_ab (0:3) gpla (0:5), gplb( 0:5) b8 b31a b31b b31c b32c b33a b32b b32a b32 b34 b34a b34b b33 b36 b35 b35a b35b b32d b31d
electrical characteristics motorola mpc801 user? manual 20-19 20 figure 20-15. asynchronous upwait asserted detection in upm handled cycles timing diagram figure 20-16. asynchronous upwait negated detection in upm handled cycles timing diagram clkout upwait cs x bs_ab (0:3) gpla (0:5), gplb (0:5) b38 b37 clkout upwait cs x bs_ab (0:3) gpla (0:5), gplb (0:5) b38 b37
electrical characteristics 20-20 mpc801 user? manual motorola 20 figure 20-17. synchronous external master access timing diagram (gpcm handled acs = ?0? figure 20-18. asynchronous external master memory access timing diagram (gpcm controlled?cs = ?0? clkout ts a(6:31), tsiz(0:1), cs x b41 b40 b42 b22 rd/wr , burst clkout as a(6:31), cs x b40 tsiz(0:1), rd/wr b39 b22
electrical characteristics motorola mpc801 user? manual 20-21 20 figure 20-19. asynchronous external master timing diagram (control signals negation time) figure 20-20. interrupt detection timing diagram for external level-sensitive lines table 20-2. interrupt timing num characteristic expression 25 mhz 40 mhz unit min max min max i39 irq x valid to clkout rising edge (setup time) 1 6?ns i40 irq x hold time after clkout 1 2?ns i41 irq x pulse width low 3 3 ns i42 irq x pulse width high 3 3 ns i43 irq x edge to edge time 4*tc 160 80 ns 1. the timings i39 and i40 describe the conditions under which the irq lines are tested when being defined as level-sensitive. the irq lines are synchronized internally and do not have to be asserted or negated with reference to the clkout. 2. the timings i41, i42, and i43 are speci?d to allow the irq line detection circuitry to function correctly. it has no direct relation with the total system interrupt latency that the mpc801 supports. as cs x, b43 we (0:3), oe , gpl x, bs (0:3) clkout irq x i39 i40
electrical characteristics 20-22 mpc801 user? manual motorola 20 figure 20-21. interrupt detection timing diagram for external edge-sensitive lines figure 20-22. debug port clock input timing diagram table 20-3. debug port timing num characteristic expression 25 mhz 40 mhz unit min max min max d61 dsck cycle time 120 60 ns d62 dsck clock pulse width 50 25 ns d63 dsck rise and fall times 0 3 0 3 ns d64 dsdi input data setup time tbd tbd ns d65 dsdi data hold time tbd tbd ns d66 dsck high to dsdo data valid 0 tbd 0 tbd ns d67 dsck high to dsdo invalid 0 tbd 0 tbd ns clkout irq x i39 i43 i41 i42 i43 dsck d61 d63 d61 d62 d62 d63
electrical characteristics motorola mpc801 user? manual 20-23 20 figure 20-23. debug port timing diagram table 20-4. reset timing num characteristic expression 25 mhz 40 mhz unit min max min max r69 clkout to hreset high impedance 20 20 ns r70 clkout to sreset high impedance 20 20 ns r71 rstconf pulse width 17*tc 680 425 ns r72 r73 configuration data to hreset rising edge setup time 15*tc+tcc 650 425 ns r74 configuration data to rstconf rising edge setup time 650 425 ns r75 configuration data hold time after rstconf negation 0?ns r76 configuration data hold time after hreset negation 0?ns r77 hreset and rstconf asserted to data out drive 25?5ns r78 rstconf negated to data out high impedance. 25?5ns r79 clkout of last rising edge before chip three states hreset to data out high impedance. 25?5ns dsck d64 dsdi dsdo d65 d66 d67
electrical characteristics 20-24 mpc801 user? manual motorola 20 figure 20-24. reset timing diagram (configuration from data bus) r80 dsdi, dsck setup 3 tcc 120 75 ns r81 dsdi, dsck hold time 0 0 ns r82 sreset negated to clkout rising edge for dsdi and dsck sample 8*tcc 320 200 ns table 20-4. reset timing (continued) num characteristic expression 25 mhz 40 mhz unit min max min max hreset rstconf d(0:31) (in) r71 r73 r76 r75 r74
electrical characteristics motorola mpc801 user? manual 20-25 20 figure 20-25. reset timing diagram?pc801 data bus weak drive during configuration figure 20-26. reset timing diagram?ebug port configuration clkout hreset d(0:31) (out) r69 rstconf (weak) r77 r78 r79 clkout sreset r70 dsck, dsdi r82 r80 r80 r81 r81
electrical characteristics 20-26 mpc801 user? manual motorola 20 20.6 ieee 1149.1 electrical specifications figure 20-27. jtag test clock input timing diagram table 20-5. jtag timing num characteristic expression 25 mhz 40 mhz unit min max min max j82 tck cycle time 100 100 ns j83 tck clock pulse width measured at 1.5 v 40 40 ns j84 tck rise and fall times 0 10 0 10 ns j85 tms, tdi data setup time 5 5 ns j86 tms, tdi data hold time 25 25 ns j87 tck low to tdo data valid 27 27 ns j88 tck low to tdo data invalid 0 0 ns j89 tck low to tdo high impedance 20 20 ns j90 trst assert time 100 100 ns j91 trst setup time to tck low 40 40 ns j92 tck falling edge to output valid 50 50 ns j93 tck falling edge to output valid out of high impedance 50?0ns j94 tck falling edge to output high impedance 50 50 ns j95 boundary scan input valid to tck rising edge 50?0ns j96 tck rising edge to boundary scan input invalid 50?0ns j82 tck j82 j84 j83 j83 j84
electrical characteristics motorola mpc801 user? manual 20-27 20 figure 20-28. jtag?est access port timing diagram figure 20-29. jtag?rst timing diagram tck tms, tdi tdo j85 j88 j87 j89 j86 tck trst j91 j90
electrical characteristics 20-28 mpc801 user? manual motorola 20 figure 20-30. boundary scan (jtag) timing diagram tck j92 j94 j93 j95 j96 output signals output signals output signals
motorola mpc801 user? manual 21-1 21 section 21 communication electrical characteristics 21.1 pio ac electrical specifications figure 21-1. parallel i/o data-in/data-out timing diagram num characteristic expression 25 mhz 40 mhz unit min max min max 1 data-in setup time to clock low 20 15 ns 2 data-in hold time from clock low 10 7.5 ns 3 clock high to data-out valid (cpu writes data, control, or direction) ?5?5ns clko data in data out 1 2 3
communication electrical characteristics 21-2 mpc801 user? manual motorola 21 21.2 uart brg clock ac electrical specifications figure 21-2. baud rate generator from uart?iming num characteristic expression 25 mhz 40 mhz unit min max min max 50 1 brg 2 rise and fall time ?0?0ns 51 1 brg 2 duty cycle 40 60 40 60 % 52 1 brg 2 cycle 40?0ns notes: 1. these specifications are valid when dividing factor 1 1 and has a 50% duty cycle. 2. baud rate generator from uart is allowable when there is dedicated usage of the ugpio signal. 51 51 brg 52 50 50
communication electrical characteristics motorola mpc801 user? manual 21-3 21 21.3 uart?xternal clock ac electrical specifications 21.4 uart?nternal clock ac electrical specifications num characteristic expression 25 mhz 40 mhz unit min max min max 100 1 clk width high 2 clko clko ns 101 clk width low 2 clko+5 clko+5 ns 102 clk rise/fall time 2 15?5ns 103 utxd active delay (from clk falling edge) 2 0 50050ns 104 urts active/inactive delay (from clk rising edge) 2, 4 0 50050ns 105 ucts setup time to clk rising edge 2 5 ?ns 106 urxd setup time to clk rising 2, 3 5 ?ns 107 urxd hold time from clk rising edge 2, 3 5 ?ns notes: 1. the ratio syncclk/clk must be greater or equal to 2.25/1. 2. extclk is available when ugpio is assigned this functionality. 3. receive speci?ation is referred to synchronous mode x=1. 4. speci?ation refers to ur ts activation in serial mode. num characteristic expression 25 mhz 40 mhz unit min max min max 100 1 clk frequency 0 8.3 0 13 mhz 102 clk rise/fall time ns 103 utxd active delay (from clk falling edge) 2 030030ns 104 urts active/inactive delay (from clk rising edge ) 2, 4 030030ns 105 ucts setup time to clk rising edge 2 40?0ns 106 urxd setup time to clk rising edge 2, 3 40?0ns 107 urxd hold time ffrom clk rising edge 2, 3 0?ns notes: 1. the ratio syncclk/clk must be greater than or equal to 3/1. 2. the clk is visible when ugpio is configured accordingly. 3. receive specification is referred to synchronous mode x=1. 4. specification refers to urts activation in serial mode.
communication electrical characteristics 21-4 mpc801 user? manual motorola 21 figure 21-3. uart receive figure 21-4. uart transmit 102 102 101 100 106 clk urxd (input) 107 104 104 urts (output) 102 102 101 107 105 clk utxd (output) ucts (sync- input) 100 103
communication electrical characteristics motorola mpc801 user? manual 21-5 21 21.5 spi master ac electrical specifications figure 21-5. spi master (cp=0) num characteristic expression 25 mhz 40 mhz unit min max min max 160 master cycle time 4 1024 4 1024 tcyc 161 master clock (sck) high or low time 2 512 2 512 tcyc 162 master data setup time (inputs) 50 50 ns 163 master data hold time (inputs) 0 0 ns 164 master data valid (after sck edge) 20 20 ns 165 master data hold time (outputs) 0 0 ns 166 rise time output 15 15 ns 167 fall timeoutput 15 15 ns spiclk ci=0 output spiclk ci=1 output spimiso input spimosi output msb in data lsb in msb in 161 167 163 165 164 166 166 167 167 166 161 msb out data lsb out msb out 160 162
communication electrical characteristics 21-6 mpc801 user? manual motorola 21 figure 21-6. spi master (cp=1) 21.6 spi slave ac electrical specifications num characteristic expression 25 mhz 40 mhz unit min max min max 170 slave cycle time 2 2 tcyc 171 slave enable lead time 15 15 ns 172 slave enable lag time 15 15 ns 173 slave clock (spiclk) high or low time 1 1 tcyc 174 slave sequential transfer delay (does not require deselect) 1 1 tcyc 175 slave data setup time (inputs) 20 20 ns 176 slave data hold time (inputs) 20 20 ns 177 slave access time 50 50 ns 178 slave spi miso disable time 50 50 ns 179 slave data valid (after spiclk edge) 50 50 ns 180 slave data hold time (outputs) 0 0 ns 181 rise time (input) 15 15 ns 182 fall time (input) 15 15 ns spiclk ci=0 output spiclk ci=1 output spimoso input spimosi output msb in data lsb in msb in 162 161 167 163 166 166 167 167 166 161 msb out data lsb out msb ou t 160 165 164
communication electrical characteristics motorola mpc801 user? manual 21-7 21 figure 21-7. spi slave (cp=0) figure 21-8. spi slave (cp=1) spiclk ci=0 input spiclk ci=1 input spimiso output spimosi input msb out data lsb out msb out 177 173 180 181 181 182 182 181 msb in data lsb in msb in 170 spisel input 178 179 175 176 182 undef 171 172 174 173 spiclk ci=0 input spiclk ci=1 input spimiso output spimosi input undef data lsb out msb out 173 180 181 181 182 182 173 msb in data lsb in msb in spisel input 178 179 175 176 182 172 174 msb out 177 171 170 181
communication electrical characteristics 21-8 mpc801 user? manual motorola 21 21.7 i 2 c ac electrical specifications?cl < 100 khz 21.8 i 2 c ac electrical specifications?cl > 100 khz num characteristic expression 25 mhz 40 mhz unit min max min max 200 scl clock frequency (slave) 0 100 0 100 khz 200 scl clock frequency (master) 1.5 100 1.5 100 khz 202 bus free time between transmissions 4.7 4.7 m s 203 low period of scl 4.7 4.7 m s 204 high period of scl 4.0 4.0 m s 205 start condition setup time 4.7 4.7 m s 206 start condition hold time 4.0 4.0 m s 207 data hold time 0 0 m s 208 data setup time 250 250 ns 209 sdl/scl rise time 1 1 m s 210 sdl/scl fall time 300 300 ns 211 stop condition setup time 4.7 4.7 m s note: scl frequency is given by scl = brgclk_frequency/((brg register + 3) * pre_scaler * 2 ). the ratio syncclk/(brgclk/pre_scaler) must be greater than or equal to 4/1. num characteristic expression min max unit 200 scl clock frequency (slave) fscl 0 brgclk/48 hz 200 scl clock frequency (master) fscl brgclk/16512 brgclk/48 hz 202 bus free time between transmissions 1/(2.2 * fscl) sec 203 low period of scl 1/(2.2 * fscl) sec 204 high period of scl 1/(2.2 * fscl) sec 205 start condition setup time 1/(2.2 * fscl) sec 206 start condition hold time 1/(2.2 * fscl) sec 207 data hold time 0 sec 208 data setup time 1/(40 * fscl) sec 209 sdl/scl rise time 1/(10 * fscl) sec 210 sdl/scl fall time 1/(33 * fscl) sec 211 stop condition setup time 1/(2.2 * fscl) sec note: scl frequency is given by scl = brgclk_frequency/((brg register + 3) * pre_scaler * 2 ). the ratio syncclk/(brgclk/pre_scaler) must be greater than or equal to 4/1.
communication electrical characteristics motorola mpc801 user? manual 21-9 21 figure 21-9. i 2 c bus timing 202 206 203 204 207 208 210 209 211 sda scl 205
communication electrical characteristics 21-10 mpc801 user? manual motorola 21
motorola mpc801 user? manual 22-1 22 section 22 mechanical specifications 22.1 ordering information to order this part, call your local sales office and provide them with the following information. package type frequency (mhz) temperature order number pbga 25/40 90? c junction mpc801um/ad
mechanical specifications 22-2 mpc801 user? manual motorola 22 22.2 pin assignments?bga?op view a27 a29 a12 a9 a7 pb31 pb28 tdo tdi vdd pb23 pb20 pb17 irq1 d0 d4 a19 a15 a16 a13 a10 a8 a11 a20 a17 a14 a6 pb27 trst n/c pb21 pb18 irq7 d8 d17 d1 a24 a23 a21 a30 pb29 pb26 tck pb24 pb30 tms pb25 a18 a25 a28 vddh pb22 pb19 pb16 irq0 d13 d27 d12 d9 d11 16 15 14 13 12 11 10 9 a26 a22 a31 gnd tsiz1 tsiz0 we1 n/c we0 we2 gpla0 we3 vdd gpla2 gpla3 gpla1 cs5 cs6 cs4 cs3 cs2 cs7 cs0 wr cs1 gpla5 bdip gplb4 vddh gnd d23 d2 vddh d10 d3 gnd d14 d15 d18 d5 d16 d19 d20 vdd 7 6 5 8 d21 d22 d6 d26 d25 d24 d31 d28 d29 clkout n/c vddsyn gnd 4 3 vddh gnd 2 1 ta bb gpla4 vsssyn iwp2 ts n/c irq3 burst 22baddr30 baddr29 baddr28 vdd extal xtal kapwr vsssyn1 tea iwp0 abc de fghj k l mnp rt lwp0 at2 irq4 modck2 texp hreset rstconf iwp1 br at3 irq5 modck1 sreset poreset xfc lwp1 at1 as dp3 dp2 irq2 bi bg irq6 extclk d30 dp0 dp1 d7 n/c
mechanical specifications motorola mpc801 user? manual 22-3 22 22.3 package dimensions for more information on the printed circuit board layout of the pbga package, including thermal via design and suggested pad layout, please refer to an-1231/d, plastic ball grid array application note , which is available at your local motorola sales office. case 1130-01 issue a 256x bottom view e 0.20 b 0.15 c d d2 e2 a b 0.30 c ab side view dim min max millimeters a 1.91 2.35 a1 0.50 0.70 a2 1.12 1.22 a3 0.29 0.43 b 0.60 0.90 d 23.00 bsc d1 19.05 ref d2 e 23.00 bsc e1 19.05 ref e2 19.00 20.00 notes: 1. dimensioning and tolerancing per asme y14.5m, 1994. 2. dimensions in millimeters. 3. dimension b is measured at the maximum solder ball diameter, parallel to primary datum c. 4. primary datum c and the seating plane are defined by the spherical crowns of the solder balls. 4x m m top view (d1) 15x e 15x e (e1) 4x e /2 0.20 c 0.35 c a3 256x c a a1 a2 seating plane e 1.27 bsc 19.00 20.00 abcdefghjklmnprt 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
mechanical specifications 22-4 mpc801 user? manual motorola 22
motorola mpc801 user? manual 23-1 23 section 23 terminology this section provides the definitions to some of the key terms, concepts, and acronyms used in this document. a address demunging ?eversal of a munge operation on an address. this has the effect of restoring the original address. address munging ?ddress modification in a way that the low-order three bits of the address are exclusive-or?d with a three-bit value that depends on the length of the operand (refer to the powerpc microprocessor family: the programming environments (mpgfpe/ad) . asid ?ddress space id atomic cycle ?f multiple bus transactions by a bus master occur in a sequence where the master retains ownership of the bus during the duration of the sequence, thus preventing other master(s) from transferring in the middle of the sequence, the sequence is considered atomic. b big-endian ?n ordering of the bytes within a word where the least-significant byte is at the highest address and vice versa. for example, a 32-bit wide data bus with big-endian, the least-significant byte is located on data bus bits 24-31 and the most-significant byte is on bits 0-7. blockage ?he interval from the time an instruction begins execution until its execution unit is available for a subsequent instruction (and has 1 clock latency and 1 clock blockage). breakpoint ?n event that forces the machine to branch into a breakpoint exception routine. bubble ? number inside a circle that is used to identify specific terms in ac timing diagrams. burst ? bus transfer that has more than one piece of data associated with it.
terminology 23-2 mpc801 user? manual motorola 23 burst length ?he number of data associated with a burst cycle. for example, a burst length of four has four data pieces (four beats) associated with it. bus park ?eeps the bus granted to a bus master although it has completed the bus cycle. this allows the same master to make the next transfer without having to rearbitrate for the bus. c cas ?olumn address strobe. copyback ?pdates to external memory are delayed until forced by the user program or a transfer of bus control to an external master. at the time of forced update or relinquishment of the bus, all changes to the cache are written to external memory. until that time, cache and external memory are not coherent. critical-data first ?his feature allows the data transferred during the burst cycle to be organized where the word or data needed first is the first one to transfer within the burst-data block. the order of transferring can be sequential and usually wraps back to the word (or data) zero. for example, 1 2 t 3 t 0 for a sequence of four data with data 1 as the critical data. d datastream ? sequence of information to be processed by the core. dec ?ecrementer. e ebi ?xternal bus interface. execution serialization ?nstruction issue is halted until all instructions that are currently in progress complete execution (all internal pipeline stages and instruction buffers have emptied and all outstanding memory transactions are completed). f fetch serialization ?nstruction fetch is halted until all instructions currently in the processor have completed execution (all issued instructions as well as the prefetched instructions waiting to be issued). the machine after fetch serialization is said to be completely synchronized. fixed transaction ? bus transaction that combines the address and data phase of the bus cycle into a single event.
terminology motorola mpc801 user? manual 23-3 23 h half-word ? half-word consists of 2 bytes or 16 bits. i i 2 c ?nter-integrated circuit. instruction done ?xecution finished and results written back. instruction execution time ?ll the time between taken and done. instruction fetch ?eading the instruction data received from the instruction memory. instruction issue ?riving valid instruction bits inside the core. instruction stream ? sequence of operands to be executed by the core. interrupt ?he act of changing the machine state register and other parts of the machine state in response to an exception. irlap ?nfra-red link access protocol k k ?ilobyte. kb ?ilobit. l latency ?he interval from the time an instruction begins execution until it produces a result that is available for use by a subsequent instruction. little-endian ?yte ordering that assigns the lowest address to the lowest-order 8 bits of the scalar. lru ?east recently used. m m megabyte. mac multiply and accumulate. mb ?egabit.
terminology 23-4 mpc801 user? manual motorola 23 memory controller ? functional logic section of the mpc801. it? primary function is to provide the controls for the external bus memories and i/o devices. mmu ?emory management unit. n nmi ?onmaskable interrupt. no operation (nop) ?n instruction whose sole function is to increment the program counter, but which affects no changes to any registers or memory. p pci ?eripheral component interconnect bus. pipeline ?he act of initiating a bus cycle while another bus cycle is in progress. thus, the bus can have multiple bus cycles pending at a time. pit ?eriodic interrupt timer. r ras ?ow address strobe. rtc ?eal-time clock. rx ?eceiver. s scan chain ?he peripheral buffers of a device, linked in jtag test mode, that are addressed in a shift register fashion. scc ?erial communication controller. sequential instruction ?ny instruction that is not a flow control instruction and not isync. siu ?ystem interface unit. smc ?erial management controller. snoop ?he act of monitoring external bus activity by alternate bus masters. by snooping these external accesses, a cpu can identify accesses to memory locations that contain dirty data and possibly halt activity to supply correct data.
terminology motorola mpc801 user? manual 23-5 23 spi ?erial peripheral interface. swap ?our byte lanes, reversing (lane 0 to lane 3, lane 1 to lane 2, lane 2 to lane 1 and lane 3 to lane 0). swt ?oftware watchdog timer. t tablewalk ?n index value is used to identify an entry point in a tree structure that is traversed until a pointer is found. the system ?alks?through a table of pointers to it? end. tb ?imebase. tdm ?ime-division multiplex. tlb ?ranslation lookaside buffer. transaction ? bus transaction consists of an address transfer (address phase) and data transfers (data phase). tsa ?ime-slot assigner. tx ?ransmitter. u uart ?niversal asynchronous receiver/transmitter. upm ?ser-programmable machine. v vlsi ?ery large-scale integration chip consolidation. w watchpoint ?n event that is reported, but does not change the timing of the machine. word ? word consists of 4 bytes or 32 bits. writethrough continuous updates, as they occur, of external memory so that cache and memory maintain coherency at all times.
terminology 23-6 mpc801 user? manual motorola 23
motorola mpc801 user? manual a-1 a appendix a quick reference guide to mpc801 registers this appendix contains address information about the core control registers, internally mapped registers, and upm ram which has an indirect address access. a.1 core control registers the core and system interface unit control registers are implemented within the mpc801 and can be accessed with the mtspr and mfspr instructions. special-purpose registers must access memory indirectly via the general-purpose registers, which can be written as ?n?or simply as ?.?an assembler directive for accessing these registers is as follows: mtspr 8, r0 /* move to the link register */ mfspr 3, 638 /* moves from the immr register to register 3 */ note the immr (special purpose register #638) setting determines the base address for all on-chip 801 modules that are not dedicated to core operation. during hreset , the internal base address is initially set to one of four addresses determined by the isb field in the hard reset configuration word. if, during hreset , the rstconf pin is not driven low and the hard reset configuration word is not placed on the data bus, the initial base address is $00000000. after the reset process is finished, the internal base address can be moved to any value by writing to the immr.
quick reference guide to mpc801 registers a-2 mpc801 user? manual motorola a table a-1. standard special-purpose registers spr name description decimal spr 5:9 spr 0:4 1 00000 00001 xer fixd pt exception cause 8 00000 01000 lr link register 9 00000 01001 ctr count register 18 00000 10010 dsisr data storage int. status 19 00000 10011 dar data address register 22 00000 10110 dec decrementer 26 00000 11010 srr0 machine status save/rest 27 00000 11011 srr1 machine status save/rest 272 01000 10000 sprg0 address of except. handler 273 01000 10001 sprg1 exception handler scratch 274 01000 10010 sprg2 scratch register 2 275 01000 10011 sprg3 scratch register 3 287 01000 11111 pvr processor version table a-2. standard timebase register mapping spr name description decimal spr 5:9 spr 0:4 268 01000 01100 tb read 2 read lower timebase 269 01000 01101 tbu read 2 read upper timebase 284 01000 11100 tb write 3 write lower timebase 285 01000 11101 tbu write 3 write upper timebase note: 1. extended opcode for mftb , 371 rather then 339. 2. any write ( mtspr ) to this address, results in an implementation dependent software emulation interrupt. 3. any write ( mftb ) to this address, results in an implementation dependent software emulation interrupt.
quick reference guide to mpc801 registers motorola mpc801 user? manual a-3 a table a-3. added special-purpose registers spr name description decimal spr 5:9 spr 0:4 80 00010 10000 eie* external interrupt enable 81 00010 10001 eid external insterrupt disable 82 00010 10010 nri non-recoverable int. 144 00100 10000 cmpa compare a value 145 00100 10001 cmpb compare b value 146 00100 10010 cmpc compare c value 147 00100 10011 cmpd compare d value 148 00100 10100 icr interrupt cause 149 00100 10101 der debug enable 150 00100 10110 counta instr/load watchpt count 151 00100 10111 countb instr/load watchpt count 152 00100 11000 cmpe compare e value 153 00100 11001 cmpf compare f value 154 00100 11010 cmpg compare g value 155 00100 11011 cmph compare h value 156 00100 11100 lctrl1 load/store compare cntl 157 00100 11101 lctrl2 load/store and-or 158 00100 11110 ictrl instr. support cntl 159 00100 11111 bar breakpt address 630 10011 10110 dpdr develop. port data 631 10011 10111 dpir develop. port instr. 638 10011 11110 immr internal memory map 560 10001 10000 ic_cst instr. cache cntl/stat 561 10001 10001 ic_adr instr. cache address 562 10001 10010 ic_dat instr. cache data 568 10001 11000 dc_cst data cache cntl/stat 569 10001 11001 dc_adr data cache address 570 10001 11010 dc_dat data cache data 784 11000 10000 mi_ctr instruction mmu cntl 786 11000 10010 mi_ap instr. mmu access perm. 787 11000 10011 mi_epn instr. mmu effect. pg num
quick reference guide to mpc801 registers a-4 mpc801 user? manual motorola a a.2 internally mapped registers the mpc801 internal memory resources are mapped within a contiguous block of storage. the size of the internal space in the mpc801 is 16k. the location of this block within the global 4g real storage space can be mapped on a 64k resolution through an implementation specific special register, and the internal memory map register (immr). the following table defines the internal memory map of the mpc801. 789 11000 10101 mi_twc (mi_l1dl2p) instr. mmu tblewalk cntl 790 11000 10110 mi_rpn instr. mmu real pg num 816 11001 10000 mi_dbcam data mmu cam read 817 11001 10001 mi_dbram0 data mmu ram read 0 818 11001 10010 mi_dbram1 data mmu ram read 1 792 11000 11000 md_ctr data mmu cntl 793 11000 11001 m_casid casid 794 11000 11010 md_ap data mmu access priv 795 11000 11011 md_epn data mmu eff. page num 796 11000 11100 m_twb (md_l1p) mmu tablewalk base 797 11000 11101 md_twc (md_l1dl2p) data mmu tblewalk cntl 798 11000 11110 md_rpn data mmu real pg num 799 11000 11111 m_tw (m_save) mmu tablewalk special 824 11001 11000 md_dbcam data mmu cam read 825 11001 11001 md_dbram0 data mmu ram read0 826 11001 11010 md_dbram1 data mmu ram read1 table a-4. other control registers description name machine state register msr condition register cr table a-3. added special-purpose registers (continued) spr name description decimal spr 5:9 spr 0:4
quick reference guide to mpc801 registers motorola mpc801 user? manual a-5 a to address the registers below, the number in the internal address column is added as an offset to the immr (special-purpose register number 638). for example, if the most-significant bits of the immr register are set to $ff00 must be initialized, the sdma configuration register (sdcr) at location $ff000030 can be written to. to access the dual port ram, you should address locations $ff002000 through $ff004000. table a-5. mpc801 internal memory map internal address mnemonic name size general system interface unit 000 siumcr siu module configuration register 32 004 sypcr system protection control register 32 008 res reserved 00e swsr software service register 16 010 sipend siu interrupt pending register 32 014 simask siu interrupt mask register 32 018 siel siu interrupt edge level mask register 32 01c sivec siu interrupt vector register 32 020 tesr transfer error status register 32 024 to 02f res reserved uart1 controller 040 cntreg1 control register 16 044 baudreg1 baud control register 16 048 globreg1 global register 16 04c rxreg1 receiver register 16 050 txreg1 transmitter register 16 054 rxreg1 receiver register (special read mode) 16 058 to 05f res reserved uart2 controller 060 cntreg2 control register 16 064 baudreg2 baud control register 16 068 globreg2 global register 16 06c rxreg2 receiver register 16 070 txreg2 transmitter register 16 074 rxreg2 receiver register (special read mode) 16 078 to 0ff res reserved
quick reference guide to mpc801 registers a-6 mpc801 user? manual motorola a memory controller 100 br0 base register bank 0 32 104 or0 option register bank 0 32 108 br1 base register bank 1 32 10c or1 option register bank 1 32 110 br2 base register bank 2 32 114 or2 option register bank 2 32 118 br3 base register bank 3 32 11c or3 option register bank 3 32 120 br4 base register bank 4 32 124 or4 option register bank 4 32 128 br5 base register bank 5 32 12c or5 option register bank 5 32 130 br6 base register bank 6 32 134 or6 option register bank 6 32 138 br7 base register bank 7 32 13c or7 option register bank 7 32 140 to 163 res reserved 164 mar memory address register 32 168 mcr memory command register 32 16c to 16f res reserved 170 mamr machine a mode register 32 174 mbmr machine b mode register 32 178 mstat memory status register 16 17a mptpr memory periodic timer prescaler 16 17c mdr memory data register 32 table a-5. mpc801 internal memory map (continued) internal address mnemonic name size
quick reference guide to mpc801 registers motorola mpc801 user? manual a-7 a system integration timers 200 tbscr timebase status and control register 16 204 tbreff0 timebase reference register 0 32 208 tbreff1 timebase reference register 1 32 20c to 24f res reserved 220 rtcsc real-time clock status and control register 16 224 rtc real-time clock register 32 228 rtsec real-time alarm seconds 32 22c rtcal real-time alarm register 32 230 to 23f res reserved 240 piscr periodic interrupt status and control register 16 244 pitc periodic interrupt count register 32 248 pitr periodic interrupt timer register 32 24c to 27f res reserved clocks and reset 280 sccr system clock control register 32 284 plprcr pll, low-power and reset control register 32 288 rsr reset status register 32 28c to 2ff res reserved system integration timers keys 300 tbscrk timebase status and control register key 32 304 tbreff0k timebase reference register 0 key 32 308 tbreff1k timebase reference register 1 key 32 30c tbk timebase and decrementer register key 32 310 to 31f res reserved 320 rtcsck real-time clock status and control register key 32 324 rtck real-time clock register key 32 328 rtseck real-time alarm seconds key 32 32c rtcalk real-time alarm register key 32 table a-5. mpc801 internal memory map (continued) internal address mnemonic name size
quick reference guide to mpc801 registers a-8 mpc801 user? manual motorola a 330 to 33f res reserved 340 piscrk periodic interrupt status and control register key 32 344 pitck periodic interrupt count register key 32 348 to 37f res reserved clocks and reset keys 380 sccrk system clock control key 32 384 plprcrk pll, low-power and reset control register key 32 388 rsrk reset status register key 32 38c to 3ff res reserved i 2 c controller 180 i2cer i 2 c event register 8 184 i2cmr i 2 c mask register 8 188 i2crd i 2 c receive data register 16 18c i2ctd i 2 c register 16 190 i2mod i 2 c mode register 8 194 i2add i 2 c address register 8 198 i2brg i 2 c brg register 8 19c i2com i 2 c command register 8 1a0 to 1af res reserved serial controller 1b0 seccom serial controller command register 8 1b4 to 1bf res reserved serial peripheral interface 1c0 spier spi event register 8 1c4 spimr spi mask register 16 1c8 spird spi receive data register 32 1cc spitd spi transmit data register 32 1d0 spmode spi mode register 16 1d5 spcom spi command register 8 1d8 to 1df res reserved table a-5. mpc801 internal memory map (continued) internal address mnemonic name size
quick reference guide to mpc801 registers motorola mpc801 user? manual a-9 a port b 1e0 pbodr port b open-drain register 16 1e4 pbdat port b data register 16 1e8 pbdir port b data direction register 16 1ec pbpar port b pin assignment register 16 af0 to 1ff res reserved table a-5. mpc801 internal memory map (continued) internal address mnemonic name size
quick reference guide to mpc801 registers a-10 mpc801 user? manual motorola a
motorola mpc801 user? manual b-1 b appendix b applications this section describes how to move applications from the mc68360 quicc environment to the mpc801 powerquicc environment. it is assumed that you are familiar with the differences between the 68k-type bus used by the quicc and the powerpc architecture used by the mpc801. this section is intended to address transferring software from one application to another. b.1 mpc801 basic initialization the values given below are valid for the motorola mpc801 application development system, but their validity cannot be guaranteed for all other designs. when the mpc801 comes out of power-on or hard reset, the following sequence occurs: 1. the hardware configuration is sampled on the two last rising edges of clkout before hreset is released. 2. the sampled value can either be from the data bus or an internal default configuration. if, at sampling time, the rstconf is asserted, then the configuration is sampled from the data bus. otherwise, it is sampled from the internal default. 3. the word sampled on the bus informs the mpc801 of the arbitration type that is allowed, what the initial interrupt prefix will be, whether or not the memory controller should be disabled at startup (the general-purpose chip-select machine is disabled, thus disabling cs0 ), what the boot port size should be, and what the base address of the internal memory space is at startup. once the reset sequence is completed, the mpc801 should be initialized according to the following steps. note the values written to registers in this example apply to a particular application and should not be used without first verifying that they are appropriate for the requirements of the system being initialized. 1. initialize the core registers. msr and srr1?x00001002. enables external interrupts, machine check interrupts and recoverable interrupts. this value does not allow traces or floating-point operation, but enables supervisor mode. the byte ordering is determined in the le bit of the msr.
applications b-2 mpc801 user? manual motorola b der?xffe7400f sets the decrementer register to 4x10 8 iterations. the current values of der is only suitable if your program is running under the mpcbug and you are not willing to claim any exceptions or handle any exceptions that occur while the program is running. this is due to the fact that all exceptions trap into the mpcbug. in a normal situation, der must be initialized to zero so that all exceptions go to your program instead of entering debug mode. with this value in the der, a system hang occurs if there is no connection at the debug port. 2. initialize the following system interface unit registers. immr?et to valid system address sets the internal memory map base address, thus allowing the software to calculate the location of on-chip resources. notice that setting the immr has the same effect as the value sampled in the isb field on the data bus at system start-up. this value changes based on the base address used in a particular system design and accesses to memory-mapped registers should fit within a particular board? memory map. siumcr?r the existing value with 0x00032640 this three-states spkrout, enables the gpl pin functionality, enables irq6 , prevents the debugger from accessing address lines 8:15, and enables parity. sypcr?xffffff88 enables the bus monitor, causes swt to stop when freeze is asserted, and clears the swt timer enable bit. the swt is set to the maximum period which is 64k clocks. tbscr?x00c2 freezes the decrementer and timebase counter when freeze is asserted and also allows the timebase to generate an interrupt when the refa (refb) bit is asserted. piscr?x0082 clears the periodic interrupt status and disables pit interrupts when freeze is asserted. b.1.1 programming the upm the following tables are examples of how to program the upm for a given type of dram. all example values assume 70ns of dram. each table is a specific type of access and the starting address of each ram entry is where the upm goes for a given type of access. the current upm values are only optimized for 70ns of dram when the mpc801 is running at a 50mhz clock. running at a lower frequency degrades the memory access and causes the system performance to scale incorrectly when it uses these exact values.
applications motorola mpc801 user? manual b-3 b table b-1. read single beat?ssa ram address upm word 0x00 0x0fffec24 0x01 0x0fffec04 0x02 0x0cffec04 0x03 0x00ffec04 0x04 0x00ffec00 0x05 0x37ffec47 table b-2. write single beat?ssa ram address upm word 0x18 0x0fafcc24 0x19 0x0fafcc04 0x1a 0x08afcc04 0x1b 0x00afcc00 0x1c 0x37ffcc47 table b-3. read burst cycle?bsa ram address upm word 0x08 0x0fffcc24 0x09 0x0fffcc04 0x0a 0x08ffcc04 0x0b 0x00ffcc04 0x0c 0x00ffcc08 0x0d 0x0cffcc44 0x0e 0x00ffec0c 0x0f 0x03ffec00 0x10 0x00ffec44 0x11 0x00ffcc08 0x12 0x0cffcc44 0x13 0x00ffec04 0x14 0x00ffec00 0x15 0x3fffec47 table b-4. write burst cycle?bsa ram address upm word 0x20 0x0fafcc24 0x21 0x0fafcc04 0x22 0x08afcc00 0x23 0x07afcc4c 0x24 0x08afcc00 0x25 0x07afcc4c 0x26 0x08afcc00 0x27 0x07afcc4c 0x28 0x08afcc00 0x29 0x37afcc47
applications b-4 mpc801 user? manual motorola b 3. initialize cs and the memory controllers. or0/or1/or2?r0=0xffe00954 or1 = 0xffff8110?ompares all bits in br1 to the access address, uses normal cs behavior, defines address pins in the br, and allows page mode and 10 clock wait state with normal timing. or2 = 0xffc00800?ompares 10 most-significant bits in br2 to the access address, uses normal cs behavior that is asserted at the same time as as , has zero wait states, and allows page mode. br0/br1/br2?r0=0xffc00800 this section of memory is left invalid. br1 = 0x21000001?his section of memory starts at address 0x210000, and gpcsm is valid; br2 = 0x00000081?his section of memory starts at 0x000000, and upm1 is valid. mptpr 0x0800 scales the system frequency by eight before the periodic (refresh) timer is calculated. mamr?x80a21114 enables a refresh cycle every 40 m s, has 10 column address lines, programs a single cycle precharge, and allows a single beat per word for all burst accesses. 4. initialize the memory management unit (mmu). for a complete description of the initialization of the memory management unit, refer to the memory management unit and cache application note. 5. initialize the cache. for a complete description of the procedure for initializing the cache, refer to the memory management unit and cache application note. table b-5. refresh cycle?bsa ram address upm word 0x30 0xe0ffcc84 0x31 0x00ffcc04 0x32 0x00ffcc04 0x33 0x0fffcc04 0x34 0x7fffcc04 0x35 0xffffcc86 0x36 0xffffcc05 table b-6. exception cycle?csa ram address upm word 0x3c 0x33ffcc07
applications motorola mpc801 user? manual b-5 b b.1.2 mpc801 mmu/cache example b.1.2.1 basic mmu and cache concept. this concept is a step-by-step example of how to initialize the memory management unit (mmu) and cache. it provides configuration and background information on the memory management unit and cache from a general conceptual viewpoint. b.1.2.2 general concept. a basic review of cache and mmu concepts is necessary for the best productivity. the mpc801 incorporates on-chip cache memory that consists of two fully independent caches for improving overall performance. one cache is implemented as a core instruction cache and is used to store instruction prefetch accesses from main (system) memory. the second cache is implemented as a core data cache and stores data prefetched from the data cache. the data cache can also be used as a temporary location to store data, thus saving time by updating only the cache and not memory (writethrough mode). performance throughput is improved when instruction or data words required by a program are available in the on-chip cache and the time required to access them from external memory is eliminated. in the mpc801, having on-chip multiple bus masters result in reduced external bus activity by the core, which in turn increases overall performance by increasing the availability of the bus for use by other bus masters (sdma) without degrading the performance of the core. notice that throughout the rest of this section that the term problem mode refers to what is known as user mode in 68k terms. b.1.2.2.1 instruction cache. an instruction cache is a unidirectional cache. at the beginning of a cycle the instruction is read by the core from main memory and then stored in cache for the next access by the core. however, the core can never directly alter the content of an instruction cache. since an instruction cache can only be accessed by the core, you must assure that other bus masters never alter the contents of memory that is defined as cacheable. this can be done by using the immu. during normal operation, the following sequence of operations must be performed before enabling the instruction cache. 1. the cache must be unlocked in all locations by writing 101 (bin) to the cmd field of the ic_cst register. 2. all cache locations must be invalidated by writing 101 (bin) to the cmd field of the ic_cst register. this reset sequence guarantees that the instruction cache has no garbage data marked as valid before it is turned on. 3. define cacheable and noncacheable regions of main memory by appropriately initializing the memory management unit before enabling the instruction cache. only after performing this sequence should you turn the instruction cache on by writing 001 (bin) to the cmd field of the ic_cst register.
applications b-6 mpc801 user? manual motorola b b.1.2.2.2 data cache. data cache is a bidirectional cache. the core can read as well as write directly into the content area of the data cache. in addition to this, the mpc801 allows both writethrough and writeback operation. during normal operation, the following sequence of tasks must be performed before enabling the data cache. 1. the cache must be unlocked in all locations by writing 101 (bin) to the cmd field of the dc_cst register. 2. all cache locations must be invalidated by writing 101 (bin) to the cmd field of the dc_cst register. this reset sequence guarantees that the data cache has no valid garbage data when it is turned on. 3. define cacheable and noncacheable regions and select write-back or write-through mode for the cacheable region of main memory by initializing the memory management unit. this must be performed before enabling the data cache. after following this sequence, the instruction cache can be turned on by writing 001 (bin) to the cmd field of the dc_cst register. notice that since the data cache can only be accessed by the core, no other bus master is allowed to alter the contents of the cache. cacheable memory locations should not be expected to contain correct data at a particular time in writeback mode because the bus arbitration is transparent to the programmer. in this situation, the sdma of the mpc801 would be able to execute a read from a memory location that may not yet be updated with new data from the cache. in another example, if the sdma writes to a cacheable location, the data in main memory is now more updated than the valid entry available in the data cache. the next core access from this location results in the core obtaining old data from the cache and not the updated data from the main memory. this occurs because the cache has no knowledge that there is newer data in main memory. cacheable, noncachable, writethrough, and copyback regions can be set up in memory by setting up the dmmu. b.1.3 memory management unit this section describes the basic concepts and background information concerning the mpc801 memory management unit. the mpc801 supports a demand paged virtual memory environment. the term demand refers to the fact that software programs request memory through effective addresses and the term paged refers to the fact that memory is divided into blocks of the same size page frame. each page frame is then divided into a known page size?m, 512k, 16k, 4k, or 1k. the operating system assigns pages to page frames as required. the principal memory management unit function is to translate an effective address to a real address using translation tables stored in memory. when the memory management unit receives an effective address from the load unit, it searches in each entry of its tlb for the current page to get the corresponding real address. if the translation is in the tlb, the memory management unit provides the real address to the cache controller, which determines if the instruction or data being accessed is cached. when the translation is not in the tlb, the memory management unit searches the translation tables in the memory for the translation information. this is called a tablewalk.
applications motorola mpc801 user? manual b-7 b 32-bit ea is generated no no no no upper 20 bits of ea match epn in tlb? casid match asid ? is process allowed to access this page? data fetch does the d-cache have valid entry for real address? pass data stored in d-cache as data to processor mark this d-cache line as most recently used begin s/w tablewalk is a standard 2-level table structure used? use h/w assist registers to speed up tablewalk load real address to the epn in tlb read cache line from external memory and pass data stored as data to processor at the same time store data in d-cache continue s/w tablewalk tlb error interrupt is generated yes yes yes yes end data fetch ea: effective address epn: effective page number casid: current address space id asid: address space id no is sub 4k page used ? yes sub-page valid bit set for the sub-page being accessed? tlb error interrupt is generated yes no is the page cachable? yes no read data from external memory and pass this as data to processor
applications b-8 mpc801 user? manual motorola b 32-bit ea is generated no no no no upper 20 bits of ea match epn in tlb? casid match asid ? is process allowed to access this page? data write is the page defined as writeback? update d-cache only mark this d-cache line as most recently used begin s/w tablewalk is a standard 2-level table structure used? use h/w assist registers to speed up tablewalk load real address to the epn in tlb update both d-cache and the contents of the real address continue s/w tablewalk tlb error interrupt is generated yes yes yes yes end data write ea: effective address epn: effective page number casid: current address space id asid: address space id no is sub 4k page used ? yes sub-page valid bit set for the sub-page being accessed? tlb error interrupt is generated yes no is the page cachable? yes no update the contents of the real address only
applications motorola mpc801 user? manual b-9 b 32-bit ea is generated no no no no upper 20 bits of ea match epn in tlb? casid match asid ? is process allowed to access this page? instruction fetch does the i-cache have valid entry for real address? pass data stored in i-cache as instruction to processor mark this i-cache line as most recently used begin s/w tablewalk is a standard 2-level table structure used? use h/w assist registers to speed up tablewalk load real address to the epn in tlb read cache line from external memory and pass data stored as instruction to processor and at the same time store instruction data in i-cache continue s/w tablewalk tlb error interrupt is generated yes yes yes yes end instruction fetch ea: effective address epn: effective page number casid: current address space id asid: address space id no is sub 4k page used ? yes sub-page valid bit set for the sub-page being accessed? tlb error interrupt is generated yes no is the page cachable? yes no read instruction from external memory and pass this as instruction to processor
applications b-10 mpc801 user? manual motorola b the mpc801 implements a software tablewalk with hardware assistance to perform the calculation of address required for each search. for more information on tlb operation, refer to section 11.2.1 translation lookaside buffer operation and section 11.8.1 reloading the tlb for an example of software tablewalk code. the following three figures demonstrate the flow of instruction or data. the memory management unit obtains the real address and then gets the data or instruction through the cache or main memory. b.1.3.1 memory protection. the main reason to use the memory management unit in an embedded application is to provide memory protection. there are two levels of protection?evel one and level two. b.1.3.1.1 level one protection. level one provides the following memory protection: access protection group?he access protection register contains 16 fields.the contents of this field are used according to the group protection mode. in the powerpc mode, each field holds the kp and ks bits of a corresponding segment register. to be consistent with the powerpc family: the programming environment manual, the apg value should match the four most-significant bits of the effective page number. in the domain manager mode, each field holds override information for the page protection setting. no override, no access override, or free access override modes are supported. guarded protection?he guarded attribute pertains to out-of-order execution. when a page is designated as guarded, instructions and data cannot be accessed by an out-of-order execution. when a page is designated as unguarded, out-of-order fetches and accesses are allowed. cache mode?ritethrough or writeback cache mode is selected. b.1.3.1.2 level two protection. level two provides the following memory protection: privilege or problem access protection?his allows you to program a page access as privilege only, problem only, or both. read or write protection. page shared or not shared?f the page is marked as shared the address space id must match the m_casid entry. cache enable or disable. b.1.3.2 mmu example. you should make sure that accesses to memory are error-free before enabling the memory management unit, or cache. bits 26 and 27 of the msr enable/disable the memory management unit. the following example shows how to set up the memory management unit registers and multiple table descriptors. in this example it is assumed that read/write memory is located at address $40000 for the memory translation tables or table descriptors. this example does not include address translation, so the effective address is identical to the real address. in this example, the memory management unit is used to implement various cache modes, privilege protection, and read/write protection.
applications motorola mpc801 user? manual b-11 b the following table shows the tasks that can be performed using the memory management unit. table b-7. physical memory map example address range accessed device port width 00000000 - 003fffff flash prom bank 1 32 00400000 - 007fffff flash prom bank 2 32 00800000 - 00bfffff dram 4mbyte (4 meg x 32bit) 32 09000000 - 09003fff mpc internal map 32 09100000 - 09100003 board control & status register (bcsr) 32 10000000 - 17ffffff pcmcia channel 16 note: 1. configured at hard reset via the hard reset configuration word to ff000000, changed during a special register, and written/read using mtspr / mftspr commands. 2. the bcsr is available throughout the minimal block size of the mpc801s cs region, which is 64k. (091000000?910ffff). table b-8. mmu register effective address= real address page size/ no. of page cache/ guard cache mode access privilege read/ write shared page note 00000000 - 007fffff 8m/1 on/no writethrough privilege read-only shared used for monitor program and translation table 00800000 - 008fffff 512k/2 on/no copyback privilege read/write shared used for stack and monitor scratch pad. 00900000 - 0094ffff 512k/1 off/yes privilege read/write shared used for data buffers 00950000 - 00bfffff 512k/5 on/no copyback privilege/ problem read/write shared used for problem program and data space 09000000 - 09003fff 16k/1 off/yes privilege read/write shared used to access power quicc internal ram and registers 09100000 - 09103fff 16k/1 off/yes privilege read/write shared used for access to board configuration register. 10000000 - 17ffffff 8m/16 off/yes privilege read/write shared note: the above cache and protection mode is selected to show as many of the variations as possible. there is no reason why some pages are selected as copyback or some writethrough other than for showing how this selection can be made.
applications b-12 mpc801 user? manual motorola b b.1.4 m_twb mmu tablewalk base register l1tb?ablewalk level one base value these bits determine the starting location of a level one translation table. for this example, these bits are set to $00400 so that the level one table begins at address $00400000 (point to top of second flash location). l1indx?evel one table index these bits returns either epn[0:9] or epn[2:11], depending on the setting of twam bits of the md_ctr. since these bits are read-only, a write is ignored if it is set to all zeros. b.1.5 mi_ctr instruction mmu control register gpm?roup protection mode this bit must be set at 0 to select powerpc protection mode. 0 = powerpc mode. 1 = domain manager mode. ppm?age protection mode this bit must be set at 0 for page resolution of protection. 0 = page resolution of protection. 1 = 1kresolution of protection for 4k pages. cidef?ache inhibit default this bit must be set at zero to disable the cache when the memory management unit is disabled. 0 = disable instruction cache when immu is disabled. 1 = enable instruction cache when immu id disabled. bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field l1tb bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field l1tb l1indx reserved bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gpm ppm cidef res rsv4i res ppcs reserved reset 0000001 0 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved itlb_indx reserved
applications motorola mpc801 user? manual b-13 b rsv4i?eserve four instruction tlb entries 0 = itlb_indx decremented modulo 32. 1 = itlb_indx decremented modulo 28. ppcs?rivilege/problem state compare mode this bit must be set at 1 to compare privileged accesses on tablewalk. 0 = ignore privileged/problem state during address compare. 1 = compare privilege/problem state according to mi_rpn[24:27]. itlb_indx?nstruction tlb index this bit is a pointer to the instruction tlb entry that should be loaded. this bit is automatically decremented at every instruction tlb update. set to zero since it is loaded at the time of a tablewalk. b.1.6 mx_ap instruction/data access protection register apx?ccess protection x domain manager mode: 00 = no access. 01 = client (access permission defined by page protection bits). 10 = reserved. 11 = manager (free access). powerpc mode: 00 = all access are treated as privileged. 01 = access permission defined by page protection bits. 10 = problem and privilege interpretation swapped. 10 = all accesses are treated as problem. bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field ap1 ap2 ap3 ap4 ap5 ap6 ap7 ap8 reset 0101010101010101 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field ap9 ap10 ap11 ap12 ap13 ap14 ap15 ap16 reset 0101010101010101
applications b-14 mpc801 user? manual motorola b b.1.7 md_ctr data mmu control register gpm?roup protection mode this bit must be set at 0 to select powerpc protection mode. 0 = powerpc mode. 1 = domain manager mode. ppm?age protection mode this bit must be set at 0 for page resolution of protection. 0 = page resolution of protection. 1 = 1k resolution of protection for 4k pages. cidef?ache inhibit default this bit must be set at 0 to disable cache when memory management unit is disabled. 0 = disable data cache when immu is disabled. 1 = enable data cache when immu id disabled. wtdef?ritethrough default this bit is set to zero and is ?on? care?since cidef is set to zero. 0 = writethrough mode when cache is enabled by cidef. 1 = copyback mode when cache is enabled by cidef. rsv4i?eserve 4 instruction tlb entries 0 = itlb_indx decremented modulo 32. 1 = itlb_indx decremented modulo 28. ppcs?rivilege/problem state compare mode this bit must be set at 1 to compare access privilege up on tablewalk. 0 = ignore privileged/problem state during address compare. 1 = compare privilege/problem state according to mi_rpn[24:27]. bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field gpm ppm cidef wtdef rsv4d twam ppcs reserved reset 0000011 0 bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field reserved dtlb_indx reserved reset 00 0
applications motorola mpc801 user? manual b-15 b twam?ablewalk assist mode this bit is set at 1 to support 4k page hardware assist tablewalk 0 = 1k subpage hardware assist. 1 = 4k page hardware assist. dtlb_indx?ata tlb index this bit is a pointer to the data tlb entry that should be loaded and is automatically decremented at every instruction tlb update. it is set to zero since it will be loaded when a tablewalk occurs. b.1.8 level one descriptor format register l2ba?evel 2 table base address these bits set the base address for the second translation table. bits 18?9 are only used when the twam bits of the md_ctr register are set to 1. normally, it should be set to zero. apg?ccess protection group this field selects one of 16 available protection groups form the mi/md_ap register. g?uarded storage attribute 0 = unguarded storage. 1 = guarded storage. ps?age size level one 00 = small (4k or 16k). 01 = 512k. 10 = reserved. 11 = 8m. wt?ritethrough attribute for entry 0 = copyback region. 1 = writethrough region. v?egment valid 0 = segment is invalid. 1 = segment is valid. bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field l2ba bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field l2ba reserved apg g ps wt
applications b-16 mpc801 user? manual motorola b the level one table starts from address $400000 from the setting in the m_twb register. address $400000 contains the level one descriptor 0 (l1d0) and the setting for l1d0 is as follows: l2ba = $00401 point level two table to $00401000. apg = $0 point apg to be for bits 0?. g = 0 unguarded storage. ps = 11 (bin) 8m page. wt = 1 (bin) writethrough. should not matter since this is read-only memory. v = 1 (bin) segment is valid. note the above information is duplicated on address $400004 since it is an 8m page. address $400008 contains l1d2 whose setting is as follows: l2ba = $00402 point to level two table to $402000. apg = $0 point apg to be for bits 0?. g = 0 unguarded storage. ps = 01 512k page. wt = 0 copyback. v = 1. address $40000c to $40008f contains l1d3 through l1d35. the least-significant bit of each long word should be cleared to make l1d3 through l1d35 invalid. address $400090 contains l1d36 whose setting is as follows: l2ba = $00403 point to level two table to $403000. apg = $0 point apg for bits 0?. g = 1 guarded. ps = 00 small page size. wt = 1 writethrough. disabled on level 2. v = 1 valid. address $400094 to $4000ff contains l1d37 through l1d63. notice that the least-significant bit of each long word should be cleared to make l1d37 through l1d63 invalid. address $400100 to $40017f contains l1d64 through l1d95. the contents of l1d64 through l1d95 for the apg, g, ps, wt and v bits are constant and appear as follows: apg = $0 point apg for bits 0?. g = 1 guarded. ps = 11 8m page size. wt = 1 writethrough. disabled on level 2. v = 1 valid.
applications motorola mpc801 user? manual b-17 b l2ba for l1d64 and l1d65 = $00404. point level two table to $404000. l2ba for l1d66 and l1d67 = $00405. point level two table to $405000. l2ba for l1d68 and l1d69 = $00406. point level two table to $406000. l2ba for l1d70 and l1d71 = $00407. point level two table to $407000. l2ba for l1d72 and l1d73 = $00408. point level two table to $408000. l2ba for l1d74 and l1d75 = $00409. point level two table to $409000. l2ba for l1d76 and l1d77 = $0040a. point level two table to $40a000. l2ba for l1d78 and l1d79 = $0040b. point level two table to $40b000. l2ba for l1d80 and l1d81 = $0040c. point level two table to $40c000. l2ba for l1d82 and l1d83 = $0040d. point level two table to $40d000. l2ba for l1d84 and l1d85 = $0040e. point level two table to $40e000. l2ba for l1d86 and l1d87 = $0040f. point level two table to $40f000. l2ba for l1d88 and l1d89 = $00410. point level two table to $410000. l2ba for l1d90 and l1d91 = $00411. point level two table to $411000. l2ba for l1d92 and l1d93 = $00412. point level two table to $412000. l2ba for l1d94 and l1d95 = $00413. point level two table to $413000. address $400180 to $400fff contain l1d96 through l1d1023. you should clear the lsb of each long word to make l1d96 through l1d1023 invalid.
applications b-18 mpc801 user? manual motorola b b.1.9 level two descriptor 1k resolution format register rpn?eal page number this field contains the real page number used in address translation. all 20 bits are used when the page size in the level one descriptor is set to 1k or 4k. the upper 18 bits are used when the page size in level one descriptor is set to 16k. the upper 13 bits are used when the page size in level one descriptor is set to 512k and the upper 9 bits are used when the page size in level one descriptor is set to 8m. pp1?age protection for first 1k page instruction access: 00 = no access. 01 = executable from privilege mode only. 10 = executable from both privilege and problem mode. 11 = executable from both privilege and problem mode. data access: 00 = no access. 01 = read/write from privilege mode. no access from problem mode. 10 = read/write from privilege mode. read-only from problem mode. 11 = read/write from both privilege and problem mode. pp2?age protection for second 1k page instruction access: 00 = no access. 01 = executable from privilege mode only. 10 = executable from both privilege and problem mode. 11 = executable from both privilege and problem mode. data access: 00 = no access. 01 = read/write from privilege mode. no access from problem mode. 10 = read/write from privilege mode. read-only from problem mode. 11 = read/write from both privilege and problem mode. bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn bit 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn pp1 pp2 pp3 pp4 sps sh ci v
applications motorola mpc801 user? manual b-19 b pp3?age protection for third 1k page instruction access: 00 = no access. 01 = executable from privilege mode only. 10 = executable from both privilege and problem mode. 11 = executable from both privilege and problem mode. data access: 00 = no access. 01 = read/write from privilege mode. no access from problem mode. 10 = read/write from privilege mode. read-only from problem mode. 11 = read/write from both privilege and problem mode. pp4?age protection for fourth 1k page instruction access: 00 = no access. 01 = executable from privilege mode only. 10 = executable from both privilege and problem mode. 11 = executable from both privilege and problem mode. data access: 00 = no access. 01 = read/write from privilege mode. no access from problem mode. 10 = read/write from privilege mode. read-only from problem mode. 11 = read/write from both privilege and problem mode. sps?mall page size 0 = 1k or 4k page. 1 = 16k, 512k, or 8m page. sh?hared page 0 = this entry matches only if the asid filed in the tlb entry matches the value of the m_casid register. 1 = asid comparison is disabled for this entry. ci?ache inhibit 0 = cache is enabled for this entry. 1 = cache is disabled for this entry. v?alid 0 = this page is valid. 1 = this page is invalid.
applications b-20 mpc801 user? manual motorola b b.1.10 level two descriptor 4k resolution format register rpn?eal page number this field contains the real page number used in address translation. all 20 bits are used when the page size in the level one descriptor is set to 1k or 4k. the upper 18 bits are used when the page size in level one descriptor is set to 16k, the upper 13 bits are used when it is set to 512k, and the upper 9 bits are used it is set to 8m. pp?age protection instruction access is as follows: extended encoding: 00 = no access. 01 = executable from privilege mode only. 10 = reserved. 11 = reserved. powerpc encoding: 00 = executable from privilege mode only. 01 = executable from both privilege and problem mode. 10 = executable from both privilege and problem mode. 11 = executable from both privilege and problem mode. data access is as follows: extended encoding: 00 = no access. 01 = read-only from privilege mode. no access from problem mode. 10 = reserved. 11 = reserved. powerpc encoding: 00 = read-only from privilege mode. no access from problem mode. 01 = read/write from privilege mode. read-only from problem mode. 10 = read/write from both privilege and problem mode. 11 = read-only from both privilege and problem mode. bits 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 field rpn reset 010 bits 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 field rpn pp ppm c ppapv sps sh ci v reset 0 0 00 0 0000
applications motorola mpc801 user? manual b-21 b ppm?age protection mode 0 = pp is set to powerpc encoding. 1 = pp is set to extended encoding. c?hange bit for entry 0 = no change has been performed (write-protected). 1 = changed region. writes are allowed. ppapv?page protection access privilege or valid if the ppcs bit of the mx_ctr register is 0, the settings are as follows. however, if the page size is larger than 4k, then all 4 bits should have the same value 0 = subpage is invalid. 1 = subpage is valid. if the ppcs bit of the mx_ctr register is 1 the settings are as follows. other bit combinations are reserved. 1000 = hit only for privilege access. 0100 = hit only for problem access. 1100 = hit for both privilege and problem access. sps?mall page size 0 = 1k or 4k page. 1 = 16k, 512k, or 8m page. sh?hared page 0 = this entry matches only if the asid filed in the tlb entry matches the value of the m_casid register. 1 = asid comparison is disabled for this entry. ci?ache inhibit 0 = cache is enabled for this entry. 1 = cache is disabled for this entry. v?alid bit 0 = this page is valid. 1 = this page is invalid.
applications b-22 mpc801 user? manual motorola b address $401000 to $401fff contains the level two descriptor (l2d) for l1d0 to l1d1. since the pages are set to 8 m, all 1,024 entries of l2d will be constant as follows: rpn = $0. pp[20-21]= 00 instruction executable only by privilege access. data access read/write only by privilege access. pp[22] = 0 powerpc encoding. pp[23] = 0 not changed (write-protect). pp[24-27] = 1,000 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address $402000 to 402fff contain l2d for l1d2. the settings are as follows. address range $402000 to 4021ff contains the first 512kpage and is l2d0 through l2d127. the settings are as follows: rpn = $00800. pp[20-21]= 00 instruction executable only by privilege access. data access read/write only by privilege access. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,000 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address 402200 to 4023ff contains the second 512kpage and is l2d128 through l2d255. the settings are as follows: rpn = $00880. pp[20-21]= 00 instruction executable only by privilege access. data access read/write only by privilege access. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,000 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid.
applications motorola mpc801 user? manual b-23 b address 402400 to 4025ff contains the third 512k page and is l2d256 through l2d383. the settings are as follows: rpn = $00900. pp[20-21]= 00 instruction executable only by privilege access. data access read/write only by privilege access. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,000 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 1 cache is disabled. v = 1 page is valid. address 402600 to 4027ff contains the fourth 512k page and is l2d384 through l2d511. the settings areas follows: rpn = $00980. pp[20-21]= 10 instruction executable on both privilege and problem mode. data access read/write from both privilege and problem mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address 402800 to 4029ff contains the fifth 512k page and is l2d512 through l2d639. the settings are as follows: rpn = $00a00. pp[20-21]= 10 instruction executable on both privilege and problem mode. data access read/write from both privilege and problem mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no-write protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid.
applications b-24 mpc801 user? manual motorola b address 402a00 to 402bff contains the sixth 512k page and is l2d640 through l2d767. the setting is as follows: rpn = $00a80. pp[20-21]= 10 instruction executable on both privilege and problem mode. data access read/write from both privilege and problem mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address 402c00 to 402dff contains the seventh 512k page and is l2d768 through l2d895. the settings are as follows: rpn = $00b00. pp[20-21]= 10 instruction executable on both privilege and problem mode. data access read/write from both privilege and problem mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address 402e00 to 402fff contains the eighth or last 512k page and is l2d896 through l2d1023. the settings are as follows: rpn = $00b80. pp[20-21]= 10 instruction executable on both privilege and problem mode. data access read/write from both privilege and problem mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 0 cache is enabled. v = 1 page is valid. address 403000 to 403ffff contains the l2d for l1d36. since only two 16k pages (0 and 256) will be used, other pages that are ?n?should be set so they are invalid. this can be accomplished by clearing the least-significant bit of a long word for address 403004 to 4033fc and 403404 to 403ffc.
applications motorola mpc801 user? manual b-25 b address 403000 contains l2d0 for l1d36. the settings are as follows: rpn = $09000. pp[20-21]= 00 instruction executable on privilege mode. data access read/write from privilege mode. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 1 cache is disabled. v = 1 page is valid. address 403400 contains l2d100 for l1d36. the settings are as follows: rpn = $09100. pp[20-21]= 00 instruction executable on privilege access. data access read/write on privilege access. pp[22] = 0 powerpc encoding. pp[23] = 1 changed (no write-protect). pp[24-27] = 1,100 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 1 cache is disabled. v = 1 page is valid. address $404000 to $413fff contains a level two descriptor (l2d) for l1d64 to l1d95. since the protection is the same throughout the 800m range, the pp[20-27], sps, sh, and v bits are constant. the settings for those bits are as follows: pp[20-21]= 00 instruction executable only by privilege mode. data access read/write only by privilege mode. pp[22] = 0 powerpc encoding. pp[23] = 1 not changed (no write-protect). pp[24-27] = 1,000 hit only for privilege access. sps = 1 16k. sh = 1 disable asid cmp. ci = 1 cache is disabled. v = 1 page is valid.
applications b-26 mpc801 user? manual motorola b for the rpn bits with 8m pages, the value changes every 1k entry: for l1d40 and l1d41, rpn = $10000. for l1d42 and l1d43, rpn = $10800. for l1d44 and l1d45, rpn = $11000. for l1d46 and l1d47, rpn = $11800. for l1d48 and l1d49, rpn = $12000. for l1d4a and l1d4b, rpn = $12800. for l1d4c and l1d4d, rpn = $13000. for l1d4e and l1d4f, rpn = $13800. for l1d50 and l1d51, rpn = $14000. for l1d52 and l1d53, rpn = $14800. for l1d54 and l1d55, rpn = $15000. for l1d56 and l1d57, rpn = $15800. for l1d58 and l1d59, rpn = $16000. for l1d5a and l1d5b, rpn = $16800. for l1d5c and l1d5d, rpn = $17000. for l1d5e and l1d5f, rpn = $17800. b.2 configuring the mpc801 memory controller a fundamental design goal of the powerquicc was to have an easy interface to other system components. to achieve this goal, the system interface unit incorporates a flexible memory controller. each of the eight memory banks can be configured to support various memory types (flash eprom, sram, dram, edo dram, or synchronous dram). the assertion and negation of the memory control signals (cs , we , oe , bs , and general-purpose lines) are defined by the software up to a quarter of a system clock resolution, so it is likely the mpc801 can interface to any type of memory. the powerquicc facilitates the different types of memory by means of the three machines included in the memory controller: the general-purpose chip-select machine (gpcm) the user-programmable machine a (upma) the user-programmable machine b (upmb) each of the eight chip-selects can be controlled by any of the three machines. the gpcm handles standard accesses to sram, eprom, feprom, and simple peripherals. port sizes of 8-, 16-, and 32-bit are supported with individual byte write enable (we ) and output enable (oe ) control. therefore, all simple memory interfaces are supported gluelessly with the gpcm. the user-rogrammable machines (upms) offer great flexibility in the definition of memory cycles. each upm can control the address multiplexing required for dram devices, the timing of four byte enables (be0:3), and the timing of six general-purpose lines (gpl0:5 ). the upm is completely controlled by the software and it runs a specific pattern for a programmable number of clock cycles.
applications motorola mpc801 user? manual b-27 b for each system clock a separate 32-bit word defines the behavior of the address multiplexing, address incrementing, and control signal assertion and negation to a quarter of a system clock resolution. it also defines the transfer acknowledge assertion. different behavior can be defined for different types of access (read, write, burst read, and burst write). b.2.1 general configuration after power-up, certain registers need initialization, assuming that initial system configuration is complete. the features of each memory bank are programmed through three registers?ption register (or), base register (br), and machine mode register (mmr). there is an individual or and br for each of the eight memory banks. b.2.2 sram configuration this application uses a 512k sram bank arranged in a 32-bit port. it is implemented using four motorola mc6226a 128k 8 cmos fast-static rams. these are available with access times of 20 to 45ns. the 45ns are sufficient devices that interact with the mpc801 using the 2-clock fast termination cycle. the cs3 * signal is used to select the sram memory bank. individual byte strobes are provide via the we *[3:0] signals. the oe * signal is used to control the output enable of the sram. figure b-1. general system configuration to select the memory bank as an sram bank, the ms[0:1] bits in the base register should be set at 00. this selects the memory bank to be controlled by the gpcm. when the bank is selected as a gpcm bank, the bi bit in the option register should be set. data(31:0) addr(11:2) cas(3:0) ras r/w dram data(31:0) addr(18:2) sram g en data(31:24) addr(19:0) eprom g en d31-0 d31-0 d31-24 a11:2 cas3:0 cs1 r/w a18:2 a19:0 cs3 cs0 we3:0 oe mpc860 system bus 1mx32 512k x32 128k x 8 mcm54400a mcm6226a 27c010 mpc801
applications b-28 mpc801 user? manual motorola b defining the memory map of the sram bank is achieved by setting several options. the sram port size can be defined as 32-bit by setting the ps[0:1] bits in the base register to 00. the base location of the memory bank is selected by setting the ba[0:16] bits in the base register. this allows the block to be defined on 32k boundaries. for example, if a base location of 20000000h is required, these bits would be set as 0010 0000 0000 0000 0b. the size of the sram bank is defined by the address mask bits (am[0:16]) in the option register. this enables blocks sizes between 32k and 4g to be selected. for example, if a block size of 1m, 80000h, these bits should be set to 0000 0000 0000 1111 1b. pare in the base register is used to enable parity checking. since parity it is not required in this design, this bit is cleared. other functions, such as write protect (wp), and address type operation (at[0:2]/atm[0:2]) can be defined as needed. table b-9. option register bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 am0 am1 am2 am3 am4 am5 am6 am7 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 am8 am9 am10 am11 am12 am13 am14 am15 bit 16 bit 17 bit 18 bit 19 bit 20 bit 21 bit 22 bit 23 am16 atm0 atm1 atm2 csnt/sam acs0 acs1 bi bit 24 bit 25 bit 26 bit 27 bit 28 bit 29 bit 30 bit 31 scy0 scy1 scy2 scy3 seta trlx res res table b-10. base register bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 ba0 ba1 ba2 ba3 ba4 ba5 ba6 ba7 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 ba8 ba9 ba10 ba11 ba12 ba13 ba14 ba15 bit 16 bit 17 bit 18 bit 19 bit 20 bit 21 bit 22 bit 23 ba16 at0 at1 at2 ps0 ps1 pare wp bit 24 bit 25 bit 26 bit 27 bit 28 bit 29 bit 30 bit 31 ms0 ms1 res res res res res v
applications motorola mpc801 user? manual b-29 b the memory controller can alter the cycle length and timing characteristics by configuring the option and base registers parameters. to determine actual values, a timing analysis of the interface is required. figure b-2 illustrates a fast termination read cycle. this shows an access with no compromise in the timings. notice that the memory controller asserts the cs from the rising edge of the so and the powerquicc does not sample the data for two full clock cycles. this means that the access times required by srams are greatly reduced in comparison to standard interfaces. if a system contains slow peripherals with long data hold times, contention could occur on the data bus between back-to-back cycles. by setting the acs[0:1] or csnt bits in the option register, the cs signal can be delayed by a quarter or half a clock. similarly, if the csnt bit is set, the cs and we signals are negated a quarter of a clock earlier. however, in this example it is assumed this is not the case and the acs[0:1] bits are set to 00 and csnt is cleared. in an mpc801 design there are three critical timings for a fast termination read cycle?ram enable access time (tacs), address access time (taa), and output enable time(toe). the equation below provides a calculation of tacs: tacs =2 tcyc ?t18 ?t22 where, tcyc = period of processor clock = 40ns for a 25mhz clock t22 = clkout high to cs = 0-20ns t18 = data-in to clkout high (data setup) = 6ns therefore, tacs = 80ns ?6ns ?20ns tacs = 54ns now the address access time (taa) can also be calculated in a similar manner: taa = 2 tcyc ?t18 ?t8 where, t8 = clkout high to address valid 19ns. therefore, taa = 80ns ?6ns ?19ns taa = 55ns finally, the output enable time (toe) is calculated as toe = tcyc ?t18 ?t25. where, t25 = clkout high to oe asserted 11ns toe = 40ns ?6ns ?11ns toe = 23ns
applications b-30 mpc801 user? manual motorola b figure b-2. sram read timing analysis for most industry standard devices (such as the mcm6226a, taa,and tacs) are similar. therefore, a memory with an access time of at least 54ns is required for fast termination cycles. this is by no means a fast memory speed and it easily meets the slowest access time for the mcm6226a (45ns). the output enable time required is 23ns, which is well within the parameter of even slow static devices, and 15ns for a 45ns mcm6226a. figure b-3 illustrates the critical timing (tdw) data valid to end of write for a fast termination write cycle. figure b-3. sram write timing analysis $pq-19 $pq-t18 $pq-11 $pq-12 $pq-8 $pq-22 $pq-23 $pq-25 $pq-26 $pq-28 $sram-taa $sram-tacs $sram-toe $sram-thz $sram-thz 0ns 50ns 100ns clkout ts a(0:31) csx oe we(0:3) d(0:31) sram-tdw sram-tdh $pq-11 $pq-12 $pq-8 $pq-30 $pq-22 $pq-23 $pq-25 $pq-28 $pq-26 $pq-8 $pq-9 $pq-29 0ns 50ns 100ns clkout ts a(0:31) csx we(0:3) oe d(0:31)
applications motorola mpc801 user? manual b-31 b now in this system, tdw = tcyc ?t8. where, t8 = clkout high to data valid 19ns. therefore, tdw = 2ns. for most standard srams, tdw is approximately half the access time. for example, for the mc6226a at 45ns, this is defined as 20ns, thus allowing for a 1ns margin. notice that this is not taking into account the clock skew of the system. if it is, then a faster part might be required. the attributes of the sram memory access cycles are determined and the timing characteristics of the sram can be configured. there are several relevant bits to aid in programming. the option register? scy[0:3] bits initialize the number of wait states required. for a fast termination cycle, this is programmed to 0h, which defines a 2-cycle access when using the sram. trlx, csnt, and acs[0:1] bits in the option register all relax the timing parameters of the access, which is useful for slow peripherals that require additional address setup time. however, none of these options are required when using fsram. to determine the how the ta signal is generated internally, the seta bit in the option register should be reset. the final bit to be set is the valid (v) bit of the base register. the cs signal is not asserted until this bit is set. this results in the following register settings: br = 20000001. or = 000f8100. b.2.3 eprom configuration this application uses a single 1mb 27c010 as a boot eprom and it is arranged as an 8-bit port. initially, this is selected by the config pins at reset. the eprom is enabled by the cs0 line and its output enable is controlled by oe , as illustrated in figure b-4. after reset, cs0 acts as the global chip-select for the whole system so it must be reconfigured by the initialization code. to select the memory bank as an eprom bank, the ms[0:1] bits in the base register should be set at 00 so the memory bank will be controlled by the gpcm. when the bank is selected as a gpcm bank, the bi bit in the option register should be set. the memory map of the eprom bank is defined by setting several options. the eprom port size is made 8-bit by setting the ps[0:1] bits in the base register to 01. to select the base location of the memory bank the ba[0:16] bits in the base register must be set. if a base location of 00000000h is required, these bits should be set to 00000h. the size of the eprom bank is defined by the address mask am[0:16] bits in the option register. if it is a block size of 128k, 20000h, these bits should be set to 00038h 0000 0000 0000 0001 1b. for an eprom bank, it is recommended that the wp bit in the base register be set so that any write access results in a no match to this memory bank. when the hardware bus monitor is enabled, it causes the tea . signal to assert.
applications b-32 mpc801 user? manual motorola b figure b-4. eprom 1 wait state read the critical timing analysis for the 27c010 is calculated as follows. figure b-4 illustrates an eprom read cycle. in an mc68360 design there are three critical timings for the read cycle. they are the eprom chip enable time, tce, the address access time, tacc and toe, and the output enable time. the equation below shows the calculation of tce: tce =2 tcyc + twait- t18 - t22 where: twait = the number of wait states required, 40ns for each wait state tcyc = period of processor clock = 40ns for a 25mhz clock t22 = clkout high to cs = 0-20ns t18 = data-in to clkout high (data setup) = 6ns therefore, for two wait states: tce = 80ns + 80ns ?6ns ?20ns tce= 134ns the address access time (tacc) can also be calculated in a similar manner as follows: tacc = 2 tcyc + twait ?t18 ?t8 where, t8 = clkout high to address valid 19ns $pq-19 $pq-t18 $pq-11 $pq-12 $pq-8 $pq-22 $pq-23 $pq-25 $pq-26 $pq-28 $ep-tacc $ep-tce $ep-toe $ep-toh $ep-toh $ep-tdf $ep-tdf 0ns 50ns 100ns 150ns 200 clkout ta a(0:31) csx oe we(0:3) d(0:31)
applications motorola mpc801 user? manual b-33 b therefore for 2 wait states: tacc = 80ns + 80ns ?6ns ?19ns tacc = 135ns finally, the output enable time toe is calculated: toe = tcyc + twait ?t18 ?t25 where, t25 = clkout high to oe asserted 11ns toe = 40ns + 80ns ?6ns ?11ns toe = 103ns for most eproms, taa is the same value as tce (the critical value). for a five cycle read, accessing a 120ns eprom is required to meet the critical timings. it is also worth verifying that the cs to data hi-z (tdf) is fast enough to avoid corrupting the next processor cycle. for a 120ns part is 35ns. therefore, data driven = tdf + t23 where, t23 is clkout to cs negated 3-10ns so, max time data drive = 10ns + 25ns = 45ns for an sram write cycle, data can be driven after: tcyc + t8 = 40ns + 10ns this allows a grace period of approximately 50?5ns = 5ns between the time the eprom is three-stated and the sram write cycle begins.
applications b-34 mpc801 user? manual motorola b b.2.4 dram configuration the dram in this application is an 8m bank arranged in a 32-bit port. the parts chosen are motorola mcm54400a 1m 4 cmos dynamic rams that are ideal for interfacing to the memory controller of the mpc801. the mpc801 provides all the control signals for a glueless interface. row and column address strobes are supplied by the cs and bs bits. the rd/wr bit drives the read/write enable signal on the dram. finally, the mpc801 provides row and column addresses controlled by internal multiplexors. a dram single in-line memory module (simm) could also be used. dram is interfaced to the mpc801 using the upm for memory control signal assertion and negation down to a quarter of a system clock resolution. this is achieved by generating a version of the system clock phase shifted by 90 (gclk1). a second clock, gclk1, is in phase with the system clock and a 32-bit word defines the behavior of the memory cycle for each clock, as illustrated in figure b-10. notice that the first four bits define the state of the cs bit for each quarter clock phase and, likewise, the next four bits define the state of the bs [0:3] bits. figure b-11 shows how these relate to clkout. asserting and negating the cs and bs [0:3] bits can be controlled down to a 10ns resolution at 25mhz or a 6ns resolution at 40mhz. table b-11. upm word structure bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 cst4 cst1 cst2 cst3 bst4 bst1 bst2 bst3 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 g0l0 g0l1 g0h0 g0h1 g1t4 g1t3 g2t4 g2t3 bit 16 bit 17 bit 18 bit 19 bit 20 bit 21 bit 22 bit 23 g3t4 g3t3 g4t4/dlt3 g4t3/ waen g5t4 g5t3 res res bit 24 bit 25 bit 26 bit 27 bit 28 bit 29 bit 30 bit 31 loop exen amx0 amx1 na uta todt last
applications motorola mpc801 user? manual b-35 b figure b-5. upm signal timings the behavior of the six general-purpose lines can be controlled to a smaller degree, but they can still be asserted at two different points per clock. these are at the falling edge of gclk2 and gclk1. the operation of these bits are defined by bits 8?1 of the upm ram word. the loop bit is used to repeat a pattern for a given number of cycles and to implement wait states into a cycle or repeat a set pattern for a burst cycle. the exen bit is used to provide a clean exit from a cycle when an exception occurs and the amx bits are used to define the address multiplexing. additionally, the na bit is used to increment the address when a burst cycle is implemented and the uta bit is used to define to sampling point for the ta signal. the todt bit is used to define the required time for a ras precharge. finally, the last bit defines a upm ram word as the last in a particular cycle. figure b-6 illustrates the configuration of the upm ram in the mpc801. it consists of a block of 64 32-bit entries. notice that there are six different entry points to the upm ram?urst read, burst write, single read, single write, the periodic timer (used for refresh), and exceptions. the system interface unit decodes the correct cycle type and jumps to the appropriate point in the upm table. for example, for a burst read it jumps to location 08h, then decodes the upm word at that location, and asserts the external signals accordingly. on each system clock it jumps to the next upm entry until the last bit is set and the decode is terminated. clkout gclk1 gclk2 csx gpl1 gpl2 cst4 cst1 cst2 cst3 cst4 cst1 cst2 cst3 g1t4 g1t3 g1t4 g1t3 g2t4 g2t3 g2t4 g2t3 word 1 word 2
applications b-36 mpc801 user? manual motorola b figure b-6. upm ram configuration because the upm? is flexible, there is no single correct configuration for a particular memory. one example configuration for the dram described above would be to select the memory bank as a dram bank controlled by the upma and set the ms[0:1] bits in the base register at 10. the memory map of the dram bank is defined by setting several options similar to the sram. the dram port size can be defined as 32-bit by setting the ps[0:1] bits in the base register to 00. the base location of the memory bank is selected by setting the ba[0:16] bits in the base register, which allows the block to be defined on 32k boundaries. for example, if a base location of 10000000h is required, these bits would be set to 1000 0000 0000 0000 0b. the size of the dram bank is defined by the am[0:16] bits in the option register, which enables 32k and 4g block sizes to be selected. for example, if a block is size 8m (8000000h), these bits should be set to 0000 0000 0111 1111 1b. cst4:1 bst4:1 gpl5 :0 control loop exen amx1:0 na uta todt last 0 34 78 2324 252627282930 31 32 bits 64 entries 00:burst read: 08:burst write: 20:single write: 18:single read: 30:periodic timer: 3c:exception: external signal generation gclk1 gclk2 cs select byte select cs (0:7) gpl (0:5) bs (0:3)
applications motorola mpc801 user? manual b-37 b the sam bit in the option register is used to define the initial address multiplexing for the dram and should be set to 1. this actual address multiplexing is defined by the ama[0:2] bits in the mamr. for a 32-bit port using devices with 10 row addresses and 10 column addresses, these should be set to 010. as with dram, parity is not required in this design, therefore the pare bit is cleared in the base register. again, other functions, such as write protect (wp) and address type operation at[0:2]/atm[0:2] can be defined by you. the dram refresh controller is supported by the pta[0:7] bits in the mamr register and is enabled by the ptae bit. motorola? mc54400a dram requires that each bit be refreshed every 16 ms by cycling through the 1,024 row addresses in sequence within the specified refresh time. therefore, a refresh cycle is required every 15.6 m s. the pta[0:7] bits in the mamr and the ptp[0:7] bits in the mptpr register determine this value using the following equation: refresh period = (pta)/(system clk/ptp[0:7]) where: refresh period = 15.6 system clk = 25mhz ptp[0:7] = 32 (defined in the mptpr) solving for rfcnt: rfcnt = 15.6 m s 25mhz/32 rfcnt = 12.1875 since pta must be an integer, it is rounded down to 24 decimal, thus allowing a refresh period of 15.36 m s. pta[0:7] is then programmed with the value 0c hex. to achieve a 3-cycle access to the dram, 60ns parts must be used. figure b-7 illustrates the timing of this interface. there are many timing constraints for the drams, but five major timing constraints determine the suitability of a device: taa?ccess time from column address tcac?ccess time from column address strobe trac?ccess time from row address strobe trc?andom read or write cycle time trp?as precharge time
applications b-38 mpc801 user? manual motorola b figure b-7. dram 3-cycle read as illustrated in figure b-11, equations can be generated to calculate these access times: taa = 1.5tcyc ?t8 ?t20 where, tcyc = period of processor clock = 40ns for a 25mhz clock t8 = clkout to address valid = 10?9ns t20 = data-in to clkout falling edge (data setup) = 4ns therefore, taa = 60ns ?20ns ?4ns taa = 36ns similarly, expressions can be developed for trac and tcac as follows: trac = 2tcyc ?t31 ?t20 tcac = tcyc ?t32 ?t20 where, t31 = clkout falling edge to cs asserted = 0?0ns t32 = clkout falling edge to cs asserted = 0?0ns pq-t20 $pq-21 $pq-11 $pq-12 $pq-8 $pq-8 $pq-7 $pq-31 $pq-31 $pq-32 $pq-32c $pq-8 $pq-7 $pq-33 $pq-33a dram-trac dram-tcac dram-tga dram -taa dram-tof dram-tgz 0ns 50ns 100ns 150n clkout ts a(0:31) cs bs (0:3) rd/wr gpl d(0:31)
applications motorola mpc801 user? manual b-39 b therefore, trac = 80ns ?10ns ?4ns trac= 66ns and, tcac = 40ns ?10ns ?4ns tcac = 26ns trac is known as the device access time and the nearest standard dram available with this access time is a 60ns device. so for a 3-cycle access, a 60ns dram is required. to achieve this timing, the data output from the dram should be sampled with the falling edge of the clkout and the gpl_a4dis (19) bit in the mamr should be defined as 1 (the default value). finally, to ensure trc (cycle time) and trp ras (precharge time), the dsa[0:1] bits in the mamr should be set. if the disable timer is not enabled, the precharge time given to the strobe is at least: trc = tcyc + t31 min ?t31 max = 40ns + 0 ?10ns = 30ns to ensure the required trc on the dram (40ns), one clock cycle of the disable timer must be added. the dsa bits in the mamr should be 00, and a dram read access must be programmed as follows. first clock: cs is asserted on the falling edge of gclk2 so: cst[4:1] = 0000 b bs are not asserted so bst[4:1] = 1111 b gpl1 (used for oe ) is not asserted so all gpl bits are 1 loop = 0 ?since this pattern is not repeated exen = 0 ?no exception is generated after this clock amx(0:1) = 10 ?so the address is multiplexed na = 0 ?no address increment uta = 1 ?no ta todt = 0 ?no precharge time yet last = 0 ?not the last entry giving the value: 0000 1111 1111 1111 1111 1111 0010 0100 b
applications b-40 mpc801 user? manual motorola b second clock: cs is still asserted so: cst[4:1] = 0000 b bs are not asserted so bst[4:1] = 0000 b gpl1 (used for oe ) is asserted so all g1t4 and g1t3 are 0, all other bits are 1 loop = 0 ?since this pattern is not repeated exen = 0 ?no exception is generated after this clock amx[0:1] = 00 ?so the address is not multiplexed na = 0 ?no address increment dlt3 = 1 ?sample data on the falling edge of clkout uta = 0 ?ta asserted todt = 0 ?no precharge time yet last = 0 ?not the last entry giving the value: 0000 0000 1111 0011 1111 1111 0000 0000 b third clock: cs is negated so: cst(4:1) = 1111 b bs are negated so bst(4:1) = 0001 b gpl1 (used for oe ) is negated so g1t4 = 1and g1t3 are 1, all other bits are 1 loop = 0 ?since this pattern is not repeated exen = 1 ?exceptions can be generated after this clock amx(0:1) = 00 ?so the address is not multiplexed na = 0 ?no address increment uta = 1 ?ta negated todt = 1 ?precharge time as per the dsa in mamr last = 1 ?the last entry giving the final value as: 1111 0001 1111 1111 1111 1111 0100 0111 b these values should be placed into the upm ram at 18 hex (the starting point for a single read cycle).
applications motorola mpc801 user? manual b-41 b figure b-8. dram 3-cycle write the dram data setup (tds) and data hold (tdh) timings are easily met by t8 and t9 timings for the mpc801. notice that a full timing analysis should be carried out before implementing a design. the upm programming for the write cycle is as follows: 0000 1111 1111 1111 1111 1111 0010 0100 0000 0000 1111 1111 1111 1111 0000 0000 1111 0001 1111 1111 1111 1111 0100 0111 the mpc801 also supports burst accesses to memory. figure b-9 and figure b-10 illustrate the timings for burst accesses for read and write. notice that they only show a single burst access for clarity. normally, the mpc801 will have a four beat burst in this case 3,2,2,2. to use the loop option in the upm machine, the rlfa and wlfa bits in the mamr should be set to 0011. dram-tds dram-tdh $pq-11 $pq-12 $pq-8 $pq-8 $pq-7 $pq-31 $pq-31 $pq-32 $pq-32c $pq-8 $pq-7 $pq-33 $pq-8 $pq-9 0ns 50ns 100ns 150n clkout ts a(0:31) cs bs (0:3) rd/wr gpl d(0:31)
applications b-42 mpc801 user? manual motorola b figure b-9. burst read access upm entries: 0000 1111 1111 1111 1111 1111 0010 0100 b 0000 0000 1111 0011 1111 1111 1000 0000 b 0000 0001 1111 0011 1111 1111 1100 1100 b 0000 0000 1111 0011 1111 1111 0000 0000 b 1111 0001 1111 1111 1111 1111 0100 0111 b pq-t20 $pq-21 pq-t20 $pq-21 $pq-11 $pq-12 $pq-8 $pq-8 $pq-8 $p $pq-31 $pq-31 $pq-32 $pq-32c $pq-32 $pq-32c $pq-8 $pq-33 $pq-33a $pq-33 $pq-33a dram-trac dram-tcac dram-tga dram-toff dram-tgz dram-tcac dram-tga s0 s1 s2 s0 s1 0ns 50ns 100ns 150ns 200ns clkout ts a(0:31) cs bs (0:3) rd/wr gpl d(0:31)
applications motorola mpc801 user? manual b-43 b figure b-10. write burst access upm entries: 0000 1111 1111 1111 1111 1111 0010 0100 b 0000 0000 1111 1111 1111 1111 1000 0000 b 0000 0001 1111 1111 1111 1111 1100 1100 b 0000 0000 1111 1111 1111 1111 0000 0000 b 1111 0001 1111 1111 1111 1111 0100 0111 b b.3 porting to the powerquicc as the next member in the family of integrated data communications controllers, the powerquicc retains a great amount of similarity between it and previous members of the data communications family (mc68302 imp and the mc68360 quicc). the powerquicc is a natural migration from the mc68360, providing greater serial power and core performance in a highly integrated package. it is important to remember that there are still many differences between the original quicc and the powerquicc. however, it is not always safe to assume that a function in the powerquicc will work like the same function in the original quicc. dram-tds dram-tdh dram-tds dram-tdh $pq-11 $pq-12 $pq-8 $pq-8 $pq-8 $p $pq-31 $pq-31 $pq-32 $pq-32c $pq-32 $pq-32 $pq-8 $p $pq-33 $pq-8 $pq-8 0ns 50ns 100ns 150ns 200ns clkout ts a(0:31) cs bs (0:3) rd/wr gpl d(0:31)
applications b-44 mpc801 user? manual motorola b b.4 using the powerpc core the core of the powerquicc is now based on the powerpc architecture rather than the mc68000. the processor architecture of the powerpc is very different from that of the mc68000. it is recommended that a designer enroll in a course about powerpc architecture before starting a powerquicc design. b.5 bit labeling it is important to note that the bit labeling of the powerpc programming environment is the opposite of the mc68000? programming environment. the actual arrangement of the bits is the same, but the high bit is referred to as bit 0 and the low bit as bit 31. b.5.1 code portability the powerpc core is not binary compatible with the cpu32+ core on the mc68360. therefore, any code written will have to be ported to the new processor. if code was written in a high-level language such as ?? a cross complier can provide the simplest code migration path. any mc68000 assembly code will have to be rewritten in c or powerpc assembly language. b.6 cache the powerquicc has both an address and data cache. this is different from the cpu32+ core of the mc68360, which had no cache at all. the cache allows the processor to run code much faster, but can create pitfalls for both overall system performance and debugging capability. b.6.1 cache performance impact a cache can improve core performance dramatically if it is used effectively. however, turning on the cache does not guarantee higher performance. the degree to which a cache will help is directly related to the memory access pattern of the program running on the core. actually, the performance of a core can sometimes decrease. a document of this size and breadth cannot effectively address the ways that a program can be optimized to achieve better cache performance. some documented methods that can yield a significant improvement in access speed include locking cache blocks, making areas of memory uncacheable, optimizing program flow, and optimizing data access patterns. these techniques are complex and their effectiveness can be altered by a simple program recompilation. caches can also complicate a benchmarking process. a benchmark, such as dhrystone, will fit entirely in a cache and can give misleading indications of processor and application performance. because of this, it is recommended that segments of code are run on an evaluation board to determine the performance that can be expected from a specific application.
applications motorola mpc801 user? manual b-45 b b.6.2 data coherency changes made in the cache are not made to memory when the cache is in writeback mode. this creates data coherency problems if another bus master (an sdma, idma, or external processor) accesses a memory location that has a more recently updated value in the cache. this can also result in data loss or program execution problems. thus, writethrough mode should be used for any memory area that can be accessed by another bus master. b.6.3 debugging the cpu32+ of the mc68360 fetches its instructions from the system bus every time a particular instruction is executed. by monitoring the external bus, it is easy to determine which instructions are executing at any given time. also, areas of memory can be monitored to determine when reads and writes occur. when a cache is placed between the core and the system bus, many of the instructions that are being executed should be out of the sight of the system, thus resulting in better performance. ideally, the core fetches instructions from cache rather than external memory, which makes the fetches invisible, thus complicating the debug process. the same restriction applies to data reads and, in some cases, writes. this restriction is familiar to those who have worked with a mc68040 or mc68060. however, the powerquicc has some additional functions in its background debug mode that gives it more debugging visibility than the mc68040 has. b.7 memory management unit another function of the powerpc core is that the memory management unit allows the use of virtual memory and special caching options. the memory management unit on the powerquicc cannot be disabled and using it can be complex. b.8 real-time operating systems a real-time operating system (rtos) can make using the memory management unit on the powerquicc simple. most commercial rtos implementations are designed to handle memory management unit and interrupt schemes, which allow the software designer to concentrate on more application-specific code than the subtleties of the memory management unit and interrupts. when porting code from the mc68360 quicc, keep the memory management unit, cache, and interrupt handling as special cases.
applications b-46 mpc801 user? manual motorola b
motorola mpc801 user? manual index-1 index index a a(6-31), 2-2 , 13-4 ac electrical specifications control timing, 20-5 access protection group (apg), 11-3 acronyms, 23-1 additional special purpose registers, 6-16 address bus, 12-1 address control bits, 15-32 address multiplexing, 15-32 address queue, 6-25 address space checking, 15-7 address translation, 11-2 address type (at0-at3), 13-33 alignment exception, 7-11 ama/amb definition for dram interface (table), 15-33 applications, b-1 mpc801, 1-7 arbitration, 13-27 architecture overview, 1-4 powerpc, 7-1 architecture, memory controller, 15-3 as, 2-7 asid, 11-2 asynchronous clocked, 18-32 asynchronous communication, 16-1 typical baud rates, 16-12 asynchronous external master, 15-38 asynchronous interrupt sources, 5-18 at(0-3), 13-4 at2, 2-6 at3, 2-7 atomic (definition), 13-27 atomic update primitives, 6-29 , 7-4 b back trace, 18-5 baddr(28-30), 2-7 bar, 6-31 base register, 15-70 , b-28 baud control register, 16-11 baud rate generator, 16-8 global controller interface, 16-8 control register, 16-8 bb, 2-4 , 13-7 bdip, 2-2 , 13-5 bg, 2-4 , 13-7 bi, 2-3 , 13-7 bit assignment control registers, 6-20 block diagram clock unit, 5-2 core, 6-3 data cache, 10-2 i 2 c controller, 16-27 ieee 1149.1 test access port, 19-2 load/store unit, 6-26 memory controller, 15-2 memory periodic timer request, 15-20 mpc801, 1-4 periodic interrupt timer, 12-12 real-time clock, 12-12 serial peripheral interface, 16-16 software watchdog timer, 12-15 system pll, 5-7 uart, 16-1 boundary scan bit definitions, 19-6 to 19-17 boundary scan register, 19-4 br, 2-4 , 13-7 , 15-6 branch 6-5 branch reservation station, 6-5 breakpoint address register, 6-31 breakpoint counter a value and control register, 18-50 breakpoint counter b value and control register, 18-51 breakpoint interrupt, 6-10 breakpoints, external, 18-8 breaks, 16-5 brgclk, 5-11 bs_b0, 2-5 bs_b1, 2-5 bs_b2, 2-5 bs_b3, 2-5 burst indicator (burst), 13-32 burst inhibit (bi), 13-35 burst mechanism, 13-16 burst transfers, 13-16 burst write cycle (illustration), 13-22 burst, 2-2 , 13-4 burst-show cycle, 13-35 bus analyzers, 18-1 bus bandwidth utilization, minimizing, 10-8
index index-2 mpc801 user? manual motorola index bus busy (bb), 13-29 bus exception control cycles, 13-40 bus grant (bg), 13-28 bus interface, 13-1 control signals, 13-3 features, 13-1 operations, 13-8 address transfer phase related signals, 13-32 alignment and packaging on transfers, 13-25 arbitration phase, 13-27 basic transfer protocol, 13-8 burst mechanism, 13-16 burst transfers, 13-16 bus exception control cycles, 13-40 single beat transfers, 13-8 single beat read flow, 13-9 single beat write flow, 13-9 , 13-12 storage reservation protocol, 13-37 termination signals, 13-35 signal descriptions, 13-4 transfer signals, 13-2 bus masters asynchronous, 15-59 support, 15-59 synchronous, 15-59 bus monitor, 12-10 bus operation timing, 20-6 bus request (br), 13-28 bus signals (illustration), 13-3 bus transfers, 13-2 bypass, 19-18 byte-enable mechanism, 16-37 c cache control instructions, 7-5 cache hit, 9-1 , 9-6 cache inhibit, 9-9 cache instruction, 9-1 , 9-6 cache miss, 9-1 , 9-6 casid, 11-2 , 11-14 change in program flow, 6-4 checkstop reset, 4-3 checkstop state, 7-10 , 18-27 clamp, 19-19 class, instruction, 7-1 clkout, 2-6 , 5-12 , 13-8 , 18-29 clock control, 5-13 clock modes asynchronous clocked, 18-32 synchronous self-clocked, 18-32 clock unit, 5-3 clocked transmissions, 18-31 clocks and power control, 5-1 basic power structure, 5-22 clock unit block diagram, 5-2 external clock input, 5-6 internal clock signals, 5-9 brgclk, 5-11 clkout, 5-12 general system clocks, 5-9 syncclk, 5-11 keep alive power, 5-23 configuration, 5-23 key mechanism, 5-24 low power divider, 5-8 on-chip oscillators, 5-6 pll pins, 5-12 pll, low power, and reset control register, 5-16 system clock control, 5-13 system pll, 5-7 block diagram, 5-8 frequency multiplication, 5-7 skew elimination, 5-7 clocks and reset memory map, 3-4 , a-7 collisions, 16-28 commands, instruction cache, 9-7 communication channels, 1-6 communication electrical characteristics, 21-1 compare types, generation of, 18-15 compression, 18-7 condition register (cr), 6-22 configuration, 12-2 i/o port pins, 16-35 keep alive power, 5-23 power supply, 5-22 reset, 4-6 system endian, 14-1 configuring port size, 15-7 configuring programmable wait state, 15-13 contention, 13-32 control registers, 6-15 , 16-8 additional special purpose registers, 6-16 bit assignment, 6-20 other, 6-18 standard special purpose registers, 6-15 standard timebase register mapping, 6-16 controlling termination of a bus cycle for a bus error, 13-40 copyback mode, 10-8 core, 1-5 , 6-1 basic instruction pipeline, 6-4 basic structure, 6-2 block diagram, 6-3 features, 6-1 fixed-point unit, 6-24 instruction flow, 6-2
index motorola mpc801 user? manual index-3 index load/store unit, 6-25 register unit, 6-15 sequencer unit, 6-4 core control registers, a-1 counters, 18-18 cr, 2-3 , 13-5 cr_b, 10-11 crystals, 5-1 cs(0-5), 2-5 cs(2-3), 2-5 current address space id register, 11-14 d d(0-31), 2-3 , 13-6 dar, 6-31 , 7-10 , 18-11 , 18-14 data address register, 18-11 data cache, 10-1 block diagram, 10-2 cache inhibited accesses, 10-9 coherency support, 10-10 control instructions, 10-11 control, 10-10 data cache read, 10-7 data cache write, 10-8 disabling, 10-10 features, 10-1 flushing and invalidation, 10-10 freeze, 10-9 implementation specific operations, 10-3 locking, 10-10 operation, 10-7 organization, 10-2 powerpc architecture instructions, 10-3 programming model, 10-3 reading, 10-11 registers special, 10-3 data cache states, 10-7 data mmu registers access protection, 11-13 cam entry read, 11-25 control, 11-12 effective page number, 11-18 ram entry read register 0, 11-26 ram entry read register 1, 11-27 real page number port, 11-20 tablewalk control, 11-19 data storage interrupt, 7-10 dc electrical specifications, 20-4 dcbf, 7-5 , 10-11 dcbi, 7-5 , 7-7 , 10-11 dcbst, 7-5 , 10-11 dcbt, 7-5 , 10-11 dcbtst, 7-5 , 10-11 dcbz, 7-5 , 10-11 debug enable register, 18-53 debug mode, 18-20 , 18-21 , 18-28 checkstop state, 18-27 entering, 18-24 exceptions, 18-28 exiting, 18-28 registers, 18-51 saving machine state, 18-27 support, 18-22 instruction fetch from the development port, 9-12 debug mode disable, 7-10 , 18-20 , 18-40 debug mode enable vs debug mode disable, 18-24 debug mode enable, 18-20 debug mode logic implementation (illustration), 18-23 debug port timing, 20-22 debug port unmaskable interrupt, 6-10 dec (definition), 12-23 decoding instructions, 19-17 decoding, 18-31 decrementer (dec), 12-3 , 12-10 decrementer register, 12-23 definitions, 23-1 der, 18-24 , 18-26 development port, 18-20 , 18-28 decoding, 18-31 pins, 18-29 registers, 18-30 serial communications clock mode selection, 18-31 debug mode, 18-37 trap enable mode, 18-32 development port shift register, 18-30 development serial data out, 18-29 development support, 18-1 programming model, 18-41 development system interface, 18-20 debug mode support, 18-22 trap enable mode, 18-22 differences between mpc860 and mpc801, 1-8 disabling the data cache, 10-10 divide instructions, 6-24 downloading end download, 18-40 fast download, 18-39 start download procedure command, 18-40 dp(0-3), 13-6 dp0, 2-3 dp1, 2-4 dp2, 2-4 dp3, 2-4 dpdr, 18-30 dpir, 18-30
index index-4 mpc801 user? manual motorola index dram, 1-1 dsck, 2-9 dsck/at1, 2-6 dsdi, 2-9 dsdo, 2-7 , 2-9 , 18-29 dsisr, 6-31 , 7-10 , 18-14 e edge interrupt, 12-6 eieio, 7-6 electrical characteristics layout practices, 20-3 embedded powerpc core, 1-5 emulator, 18-1 endian modes, 14-1 big endian mode features, 14-4 little endian mode features, 14-2 operational support, 14-2 powerpc little endian mode features, 14-4 setting, 14-5 environment, b-1 error conditions, detecting, 16-17 error, multi-master, 16-18 examples byte working mode, 18-13 controlling the timing of gpl1, gpl2, and csx, 15-22 half-word working mode, 18-13 instruction execution, 8-4 exception handling, 15-31 exceptions, 18-28 exchanging data, 16-15 extal, 2-6 extclk, 2-6 extending hold time on read accesses, 15-13 external interrupt, 6-13 extest, 19-18 f fast download procedure, 18-38 18-39 features big endian mode, 14-4 bus interface, 13-1 core, 6-1 data cache, 10-1 i 2 c controller, 16-27 instruction cache, 9-1 little endian mode, 14-2 load/store unit, 6-25 memory controller, 15-1 memory management unit, 11-1 mpc801, 1-1 parallel i/o port, 16-35 powerpc little endian mode, 14-4 program flow tracking, 18-1 serial peripheral interface, 16-16 uart, 16-2 watchpoints and breakpoints, 18-11 fifo depth, 16-27 fifo, 16-3 , 16-6 filter, context dependent, 18-14 fixed-point data queue, 6-25 fixed-point unit, 6-24 xer update in divide instructions, 6-24 floating-point assist interrupt, 7-12 floating-point unavailable interrupt, 7-11 flushing, 10-10 frame errors, 16-5 free access override mode, 11-3 freeze, 10-9 , 12-15 , 18-30 , 18-41 frequency, 5-9 frz, 2-4 , 18-28 g gear mode, 1-7 general-purpose lines, 15-30 generating watchpoints and breakpoints, 18-8 global controller interface, 16-8 global register, 16-13 glueless system design, 1-8 gpcm, 15-7 gpl_a(2-3), 2-5 gpl_a0, 2-5 gpl_a1, 2-5 gpl_a4, 2-6 gpl_a5, 2-6 gpl_b(2-3), 2-5 gpl_b0, 2-5 gpl_b1, 2-5 gpl_b4, 2-6 gpl_b5, 2-2 gpl5 line behavior (table), 15-60 h hard/soft reset, 6-24 hardware flow-control, 16-3 history buffer flushes status, 18-4 hi-z, 19-19 holding the upm machine in a particular state, 15-37 hreset, 2-6
index motorola mpc801 user? manual index-5 index i i2add, 16-31 i2brg, 16-31 i 2 c controller, 1-7 , 16-15 , 16-26 block diagram, 16-27 clocking and pin functions, 16-28 features, 16-27 memory map, 3-3 , a-8 programming model, 16-30 transmission and reception process, 16-28 i2cer, 16-33 i2cmr, 16-34 i2com, 16-31 i2crd, 16-33 i2cscl, 2-8 i2csda, 2-8 i2ctd, 16-32 i2mod 16-30 i2mod, 16-30 i-address, 18-9 ic_cst, 9-7 icbi, 7-5 icr, 18-24 icr_or, 18-28 ictrl, 18-8 , 18-20 ieee 1149.1 test access port, 19-1 block diagram, 19-2 boundary scan bit definitions, 19-6 boundary scan register, 19-4 instruction register, 19-17 motorola bsdl description, 19-19 nonscan chain operation, 19-19 restrictions, 19-19 signal pins, 19-1 tap controller, 19-3 illegal and reserved instructions, 7-1 immr, 12-20 implementation dependent software emulation interrupt, 7-12 implementation of jtag, 19-17 implementation specific debug interrupt, 7-16 implementation specific instruction tlb error interrupt, 7-13 implementation specific instruction tlb miss interrupt, 7-13 implementation specific interrupt types, 6-10 infra-red interface, 16-4 initializing control registers, 6-24 instruction address comparators, 18-16 instruction address, 18-9 instruction cache block diagram, 9-2 cache inhibit, 9-9 coherency, 9-11 commands, 9-7 data path block diagram, 9-3 disabling, 9-9 enabling, 9-10 features, 9-1 instruction fetch on a predicted path, 9-7 load & lock, 9-8 operation, 9-6 programming model, 9-4 reading, 9-10 restrictions, 9-11 special purpose control registers, 9-4 unlock all, 9-9 unlock line, 9-9 updating code and memory region attributes sequence, 9-11 updating code and memory region attributes, 9-11 writing, 9-11 instruction cache invalidate, 9-8 instruction decoding, 19-17 instruction execution timing, 8-1 examples, 8-4 instruction fetch show cycle, 18-8 instruction flow, 6-2 conceptual diagram, 6-3 instruction issue, 6-6 instruction mmu registers access protection, 11-11 cam entry read, 11-22 control, 11-10 effective page number, 11-15 ram entry read register 0, 11-23 ram entry read register 1, 11-24 real page number port, 11-17 tablewalk control, 11-16 instruction queue status, 18-3 instruction register, 19-17 instruction storage interrupt, 7-11 instruction timing, 6-29 instructions branch, 8-1 cache control, 7-5 , 8-3 cr logical, 8-1 data cache control, 10-11 divide, 6-24 extest, 19-18 fixed-point arithmetic (divide), 8-2 fixed-point arithmetic (multiply), 8-2 fixed-point arithmetic, 8-2 fixed-point compare, 8-2 fixed-point load and store, 8-2 fixed-point load, 8-2 fixed-point logical, 8-2 fixed-point rotate and shift, 8-2 fixed-point store, 8-2
index index-6 mpc801 user? manual motorola index fixed-point trap, 8-1 move condition register from xer, 8-2 move from external to core, 8-1 move from others, 8-2 move from special registers, 8-1 move to external to the core, 8-1 move to lr, ctr, 8-1 move to special, 8-1 move to/from special purpose register, 8-3 order storage access, 8-3 partially executed, 7-17 sample/preload, 19-18 storage control, 7-7 , 8-3 storage synchronization, 8-2 string, 8-3 synchronize, 8-2 system call, 8-1 timing list, 8-1 integrated circuits, 16-26 interface connection to edo, 15-52 interface, development system, 18-20 inter-integrated circuit, 16-15 internal memory map register, 3-1 internal pullup resistors, 16-35 interrupt cause register, 18-51 interrupt mechanism, 16-18 interrupts, 6-6 , 7-8 causes, 18-39 classes, 7-8 definitions, 7-8 handling, 18-26 memory managment unit, 11-29 processing, 7-8 recovery, 6-8 sources, 16-3 structure (illustration), 12-4 timing, 6-11 , 20-21 invalid and preferred instructions, 7-1 invalidation, 10-10 irq0, 2-4 irq1, 2-4 irq2, 2-3 irq3, 2-3 irq4, 2-3 , 2-4 irq5, 2-4 , 2-7 irq6, 2-4 irq7, 2-4 isync, 7-5 iwp(0-1), 2-6 iwp2, 2-7 j jitter tolerance, 16-5 joint test action group, 19-1 jtag (definition), 19-1 jtag reset, 4-3 jtag timing, 20-26 k key mechanism, 5-24 kr, 2-3 kr/retry, 13-5 kr_b, 10-11 l l-address, 18-9 last, 15-38 lctrl2, 18-14 , 18-20 l-data, 18-9 level interrupt, 12-6 level signal, 18-28 little endian, 6-29 load & lock, 9-7 , 9-8 load/store address comparators, 18-17 address, 18-9 data comparators, 18-17 data, 18-9 support and-or control register, 18-48 support comparators control register, 18-46 synchronizing instructions, 6-27 load/store unit, 6-25 atomic update primitives, 6-29 block diagram, 6-26 exceptions, 6-31 features, 6-25 instruction issue, 6-26 instruction timing, 6-29 little endian support, 6-29 nonspeculative load instructions, 6-28 off-core special registers access, 6-30 stalling storage control instructions, 6-30 storage control instructions, 6-30 store instruction cycles issue, 6-27 unaligned instructions execution, 6-28 locking the data cache, 10-10 loop, 15-31 loss of lock, 4-3 low power mode, 12-15 lru, 1-2 lwarx, 10-11 lwp0, 2-7 lwp1, 2-7
index motorola mpc801 user? manual index-7 index m m_tw, 11-15 m_twb, 11-14 machine a mode register, 15-75 machine b mode register, 15-78 machine check interrupt, 7-9 machine state register (msr), 6-10 machine state, nonrestartable, 18-9 mamr, 15-6 , 15-20 mar, 15-6 , 15-21 masked, 18-9 master external arbitration phase, 13-27 master mode, 16-17 , 16-18 , 16-26 i 2 c, 16-28 matches on bytes and half-words, 18-12 maximum ratings, 20-1 mbmr, 15-6 , 15-20 mc68360 quad integrated communications controller (quicc), 1-1 mcr, 15-6 , 15-20 md_ap, 11-13 md_ctr, 11-12 md_dcam, 11-25 md_dram0, 11-26 md_dram1, 11-27 md_epn, 11-18 md_rpn, 11-20 md_twc, 11-19 mdr, 15-6 , 15-20 memc memory map, 3-2 , a-6 memory address register, 15-84 memory banks, 15-3 memory coherence, 7-4 memory command register, 15-82 memory controller, 15-1 architecture, 15-3 block diagram, 15-2 external master support, 15-59 features, 15-1 general-purpose chip-select machine, 15-7 programming model, 15-68 registers, 15-6 user-programmable machine, 15-19 memory periodic timer request block diagram, 15-20 memory data register, 15-84 memory devices, 15-59 memory management unit, 11-1 address translation, 11-2 features, 11-1 interrupts, 11-29 programming model, 11-10 protection, 11-3 requirements for accessing the control registers, 11-32 storage attributes, 11-4 reference and change bit updates, 11-4 storage control, 11-4 tlb manipulation, 11-30 translation lookaside buffer, 11-2 translation table structure, 11-4 level one descriptor, 11-8 level two descriptor, 11-9 memory map, 3-1 clocks and reset, 3-4 , a-7 i 2 c, 3-3 , a-8 memc, 3-2 , a-6 port b, 3-3 , a-9 serial controller, 3-3 , a-8 serial peripheral interface, 3-3 , a-8 system integration timers, 3-4 , a-7 system interface unit, 3-1 , a-5 uart, 3-1 , a-5 memory periodic timer prescaler register, 15-69 messages, receiving, 16-29 mfspr, 18-41 mi_ap, 11-11 mi_ctr, 11-10 mi_dcam, 11-22 mi_dram0, 11-23 mi_dram1, 11-24 mi_epn, 11-15 mi_rpn, 11-17 mi_twc, 11-16 mmu tablewalk base register, 11-14 mmu tablewalk scratch register, 11-15 mmu, 11-1 modck1 and modck2, 2-7 modes, 18-20 copyback, 10-8 i 2 c, 16-28 low power, 5-18 writethrough, 10-9 motorola bsdl description, 19-19 mpc801 applications, 1-7 , b-1 architecture overview, 1-4 features, 1-1 system configuration, 1-8 mpc801 powerpc quad integrated communications controller (powerquicc), 1-1 msr bit special ports, 6-11 msr, 7-9 , 7-16 msree bit, 6-11 msrri bit, 6-11 mstat, 15-6 mtspr, 18-41 multi-master operation, 16-19
index index-8 mpc801 user? manual motorola index n no access override mode, 11-3 no override mode, 11-3 noise immunity, 16-5 nonmaskable interrupt (nmi), 12-5 nonoptional instructions, 7-1 o oe, 2-5 once, 1-1 op0, 13-25 op1, 13-25 op2, 13-25 op3, 13-25 operand placement (effects), 7-4 operand representation (illustration), 13-25 operation bus, 13-8 data cache, 10-7 endian mode, 14-5 global (boot) chip-select, 15-15 nonscan chain, 19-19 operations of the data cache, 10-3 operations that support endian modes, 14-2 option register, 15-72 , b-28 optional instructions, 7-1 or, 15-6 ordering information, 22-1 organization, data cache, 10-2 p package dimensions, 22-3 page size, 11-2 parallel i/o port, 16-35 features, 16-35 port b pin functions, 16-35 port b registers, 16-37 parity checking, 15-7 parity errors, 16-4 parity generation, 15-7 pb(16), 2-8 pb(17), 2-8 pb(18), 2-8 pb(19), 2-8 pb(20), 2-8 pb(21), 2-8 pb(22), 2-8 pb(23), 2-8 pb(24), 2-8 pb(25), 2-8 pb(26), 2-8 pb(27), 2-8 pb(28), 2-8 pb(29), 2-8 pb(30), 2-7 pb(31), 2-7 pbdat, 16-37 pbdir, 16-38 pbodr, 16-37 pbpar, 16-38 pci bridge, 14-2 performance, 9-12 periodic interrupt status and control register, 12-27 periodic interrupt timer (pit), 12-2 , 12-12 block diagram, 12-12 periodic interrupt timer count register, 12-28 periodic interrupt timer register, 12-29 phase-lock loop, 13-8 pie, 12-12 pin assignment, port b, 16-36 pin assignments, 2-1 , 22-2 pins development port, 18-29 pll, 5-12 piscr, 12-27 pitc, 12-12 , 12-28 pitr, 12-29 pitrtclk clock, 12-11 pll, 5-1 , 13-8 low power, and reset control register, 5-16 pins, 5-12 plprcr, 5-3 , 5-16 polling a channel, 16-6 polling mechanism, 16-18 polling uart, 16-6 poreset, 2-6 port b memory map, 3-3 , a-9 port b pin assignment, 16-36 port b pin functions, 16-35 port size configuration, 15-7 port size device interfaces (illustration), 13-26 port width, 13-2 power considerations, 20-2 consumption, minimizing, 9-6 , 10-8 keep alive, 5-23 management, 1-7 structure, 5-22 power supply (pin), 2-9 power-down wake-up, 5-1 power-on reset, 4-2 powerpc architectural specifications, 1-1 powerpc core, 1-5 , 7-1
index motorola mpc801 user? manual index-9 index powerpc standards powerpc operating environment architecture (book 3), 7-6 branch processor registers, 7-6 fixed-point processor special purpose registers, 7-6 interrupts, 7-8 optional facilities and instructions, 7-17 reference and change bits, 7-7 storage control instructions, 7-7 storage model, 7-7 storage protection, 7-7 timer facilities, 7-17 powerpc user instruction set architecture (book 1), 7-1 branch instructions, 7-2 branch processor, 7-2 computation modes, 7-1 exceptions, 7-2 fixed point-processor, 7-2 instruction classes, 7-1 instruction fetching, 7-2 load/store processor, 7-3 reserved fields, 7-1 powerpc virtual environment architecture (book 2), 7-4 operand placement effects, 7-4 storage control instructions, 7-5 storage model, 7-4 timebase, 7-6 powerquicc, porting to, b-43 prescaler, 16-8 program flow tracking, 18-1 external hardware, 18-5 features, 18-1 instruction fetch show cycle control, 18-8 internal hardware, 18-2 program interrupt, 7-11 program trace cycle, 18-2 program trace in debug mode, 18-5 program trace, reconstructing, 18-2 programmable phase-locked loop, 5-1 programming models i 2 c, 16-30 serial controller, 16-15 serial peripheral interface, 16-20 protection of development port registers, 18-41 protection, 12-2 ps, 12-12 pte, 12-12 ptr, 2-7 , 13-5 , 13-33 q queue flush information special case, 18-4 quicc, 1-1 quicc/powerquicc differences bit labeling, b-44 cache, b-44 configuration, b-27 dram, b-34 eprom, b-31 sram, b-27 initialization, b-1 mmu/cache example, b-5 porting to the powerquicc, b-43 programming the upm, b-2 r ram array size, 15-23 ram word structure and timing specifications, 15-25 rd/wr, 2-2 , 13-4 read cycle, data bus requirements, 13-26 read hit, 10-7 read miss, 10-7 read/write (rd/wr), 13-32 reading the data cache, 10-7 , 10-11 real-time clock (rtc), 12-3 , 12-11 block diagram, 12-12 real-time clock alarm register, 12-27 real-time clock register, 12-27 real-time clock status and control register, 12-26 receiver register, 16-6 receiver, 16-5 recoverable interrupt bit (msrri), 6-10 register unit, 6-15 control registers, 6-15 initialization, 6-24 hard/soft reset, 6-24 system reset interrupt, 6-24 registers bar, 6-31 base, 15-6 , 15-70 , b-28 baud control, 16-11 boundary scan, 19-4 branch processor, 7-6 machine state register, 7-6 processor version register, 7-6 breakpoint address, 6-31 core control, a-1 dar, 6-31 data cache special, 10-3 debug mode, 18-51 decrementer, 12-23
index index-10 mpc801 user? manual motorola index development port, 18-42 protection, 18-41 development port, 18-30 dsisr, 6-31 global, 16-13 i 2 c address, 16-31 i 2 c brg, 16-31 i 2 c command, 16-31 i 2 c event, 16-33 i 2 c mask & interrupt level, 16-34 i 2 c mode, 16-30 i 2 c receive data hold, 16-33 i 2 c transmit data hold, 16-32 instruction, 19-17 internal memory map, 3-1 , 12-20 machine a mode, 15-6 , 15-75 machine b mode, 15-6 , 15-78 memory address, 15-6 , 15-21 , 15-84 memory command, 15-6 , 15-20 memory controller status, 15-6 memory data, 15-6 , 15-20 , 15-84 memory periodic timer prescaler, 15-69 mmu configuration, 11-10 mmu data debug, 11-25 mmu instruction debug, 11-22 mmu tablewalk, 11-14 option, 15-6 , 15-72 , b-28 periodic interrupt status and control, 12-27 periodic interrupt timer count, 12-28 periodic interrupt timer, 12-29 pll, low power, and reset control, 5-16 port b data direction, 16-38 port b data, 16-37 port b open-drain, 16-37 port b pin assignment, 16-38 port b, 16-37 real-time clock alarm, 12-27 real-time clock status and control, 12-26 real-time clock, 12-27 receiver, 16-6 reset status, 4-4 serial controller command, 16-15 simask, 12-7 sipend, 12-6 siu interrupt edge level mask, 12-8 siu module configuration, 12-17 sivec, 12-9 software service, 12-22 special purpose, 7-6 , 7-11 added registers, 7-7 unsupported registers, 7-6 spi command, 16-22 spi event, 16-25 spi mask & interrupt level, 16-26 spi mode, 16-20 spi receive data hold, 16-24 spi transmit data hold, 16-23 srr0, 7-13 srr1, 7-14 system protection control, 12-21 system timers, 12-23 timebase control and status, 12-25 timebase reference registers, 12-24 timebase, 12-24 transfer error status, 12-22 transmitter, 16-4 registers located outside the core encoding, 6-19 reservation protocol for a multi-level (local) bus, 13-39 reset configuration hard reset, 4-6 soft reset, 4-11 external hreset, 4-2 internal hreset, 4-3 reset status register (rsr), 4-4 sequence, 9-12 timing, 20-23 types, 4-1 checkstop reset, 4-3 debug port hard reset, 4-3 debug port soft reset, 4-4 jtag reset, 4-3 loss of lock, 4-3 power-on reset, 4-2 software watchdog reset, 4-3 reset sequence, 9-12 restrictions, 19-19 watchpoints and breakpoints, 18-12 retry, 2-3 , 13-40 rsr, 4-4 , 5-3 rstconf, 2-6 rsv, 2-3 , 13-4 , 13-33 rtc, 12-27 rtcal, 12-27 rtcsc, 12-26 s sample/preload instruction, 19-18 scan chain interface, 19-19 sccr, 5-3 , 5-13 scl, 16-28 sda, 16-28 seccom, 16-15 sequencer unit, 6-4 external interrupt, 6-13 flow control, 6-4 branch folding, 6-5 branch reservation station, 6-5
index motorola mpc801 user? manual index-11 index static branch prediction, 6-5 watchpoint marking, 6-5 instruction issue, 6-6 interrrupt ordering, 6-13 interrupt ordering types, 6-13 interrupt timing, 6-11 interrupts , 6-6 exception sources, 6-6 precise exception model implementation, 6-8 restartability, 6-10 serialization, 6-12 external interrupt latency, 6-13 possible actions execution serialization, 6-12 fetch serialization, 6-12 sequencing error encoding, 18-39 sequential instructions marked as indirect branch, 18-5 serial clock pin, 16-28 serial communication modules, 16-1 i 2 c controller, 16-26 parallel i/o port, 16-35 serial controller programming model, 16-15 serial peripheral interface, 16-15 serial controller, 16-15 memory map, 3-3 , a-8 programming model, 16-15 serial data pin, 16-28 serial interface signals, 16-2 serial interface unit bus monitor, 12-10 freeze operation, 12-15 interrupt controller programming model siel register, 12-8 simask register, 12-7 sipend register, 12-6 sivec register, 12-9 interrupt sources, 12-5 priority, 12-5 low power stop operation, 12-15 periodic interrupt timer, 12-12 pins multiplexing, 12-16 powerpc decrementer, 12-10 powerpc timebase, 12-11 programming model, 12-17 decrementer register, 12-23 system timer register, 12-23 real-time clock, 12-11 software watchdog timer, 12-13 system configuration and protection registers, 12-17 internal memory map register, 12-20 software service register, 12-22 system protection control register, 12-21 transfer error status register, 12-22 serial peripheral interface, 1-7 , 16-15 block diagram, 16-16 clocking and pin functions, 16-17 features, 16-16 master mode, 16-18 memory map, 3-3 , a-8 multi-master operation, 16-19 programming model, 16-20 receiver and transmitter depths, 16-16 slave mode, 16-19 transmission and reception process, 16-18 serialization latency, 6-12 show cycles, 13-35 siel, 12-8 signal pins, of the tap, 19-1 signals clocks and power control, 5-9 system bus, 2-2 signals, external, 2-1 description a(6-31), 2-2 as, 2-7 at2, 2-6 at3, 2-7 baddr(28-30), 2-7 bb, 2-4 bdip, 2-2 bg, 2-4 bi, 2-3 bpl_b1, 2-5 br, 2-4 bs_b0, 2-5 bs_b1, 2-5 bs_b2, 2-5 bs_b3, 2-5 burst, 2-2 clkout, 2-6 cr, 2-3 cs(0-5), 2-5 cs(2-3), 2-5 d(0-31), 2-3 dp0, 2-3 dp1, 2-4 dp2, 2-4 dp3, 2-4 dsck, 2-9 dsck/at1, 2-6 dsdi, 2-9
index index-12 mpc801 user? manual motorola index dsdo, 2-7 , 2-9 extal, 2-6 extclk, 2-6 frz, 2-4 gpl_a(2-3), 2-5 gpl_a0, 2-5 gpl_a1, 2-5 gpl_a4, 2-6 gpl_a5, 2-6 gpl_b(2-3), 2-5 gpl_b0, 2-5 gpl_b4, 2-6 gpl_b5, 2-2 hreset, 2-6 i2cscl, 2-8 i2csda, 2-8 irq0, 2-4 irq1, 2-4 irq2, 2-3 irq3, 2-3 irq4, 2-3 , 2-4 irq5, 2-4 , 2-7 irq6, 2-4 irq7, 2-4 iwp(0-1), 2-6 iwp2, 2-7 kr, 2-3 lwp0, 2-7 lwp1, 2-7 modck1, 2-7 modck2, 2-7 oe, 2-5 pb(16), 2-8 pb(17), 2-8 pb(18), 2-8 pb(19), 2-8 pb(20), 2-8 pb(21), 2-8 pb(22), 2-8 pb(23), 2-8 pb(24), 2-8 pb(25), 2-8 pb(26), 2-8 pb(27), 2-8 pb(28), 2-8 pb(29), 2-8 pb(30), 2-7 pb(31), 2-7 poreset, 2-6 power supply, 2-9 ptr, 2-7 rd/wr, 2-2 retry, 2-3 rstconf, 2-6 rsv, 2-3 spiclk, 2-7 spimiso, 2-8 spimosi, 2-8 spisel, 2-7 sreset, 2-6 sts, 2-7 ta, 2-3 tck, 2-9 tdi, 2-9 tdo, 2-9 tea, 2-3 texp, 2-6 tms, 2-9 trst, 2-9 ts, 2-2 tsiz0, 2-2 tsiz1, 2-2 ucts1, 2-8 ucts2, 2-8 ugpio1, 2-8 ugpio2, 2-8 upwaita, 2-6 upwaitb, 2-6 urts1, 2-8 urts2, 2-8 urxd1, 2-8 urxd2, 2-8 utxd1, 2-8 utxd2, 2-8 vf0, 2-7 vf1, 2-7 vf2, 2-7 vfls(0-1), 2-6 we(0-3), 2-5 xfc, 2-6 xtal, 2-6 single beat transfers, 13-8 siu memory map, 3-1 , a-5 siu module configuration register (siumcr), 12-4 siu, 1-6 , 12-1 siumcr, 12-17 slave mode, 16-17 , 16-19 , 16-26 i 2 c, 16-29 snooping external bus activity, 7-4 , 10-10 software monitor debugger support, 18-40 software tablewalk routine, minimizing, 11-8 software watchdog register, 12-14 software watchdog reset, 4-3 software watchdog timer (swt), 12-2 , 12-13 block diagram, 12-15 spcom, 16-22 special ports to msr bits, 6-11 special purpose registers, 6-15 , 7-11 access, 6-30 location, 6-19
index motorola mpc801 user? manual index-13 index special registers outside the core, 6-19 spi, 1-7 , 16-15 spiclk, 2-7 spier, 16-25 spimiso, 2-8 spimosi, 2-8 spimr, 16-26 spird, 16-24 spisel, 2-7 spitd, 16-23 spll, 5-1 spmode, 16-20 spr, 7-11 sram interface, 15-16 sreset, 2-6 srr0, 7-9 , 7-16 , 18-14 , 18-27 srr1, 7-9 , 7-16 , 18-14 , 18-27 static branch prediction, 6-5 storage control instructions, 6-30 , 7-7 storage reservation protocol, 13-37 sts, 2-7 , 13-5 stwcx cycle, 13-37 stwcx, 10-11 sub-block description, 16-3 swsr, 12-22 swt, 12-13 synchronous applications, 16-8 synchronous self-clocked, 18-32 sypcr, 12-21 system clock output, 13-8 , 18-29 system integration timers memory map, 3-4 , a-7 system interface unit, 1-6 , 10-7 , 12-1 signals, 13-4 system protection control register (sypcr), 12-2 system reset interrupt, 6-24 , 7-9 system, 14-1 t ta, 2-3 , 13-6 tablewalk, 11-4 , 11-29 tap (definition), 19-1 tap controller, 19-3 tb, 12-24 tbl, 12-11 tbscr, 12-25 tbu, 12-11 tck, 2-9 , 19-2 tdi, 2-9 , 19-2 tdo, 2-9 , 19-2 tea, 2-3 , 13-7 tecr, 18-30 termination signals, 13-35 terminology, 23-1 tesr, 12-22 test access port (tap), 19-1 texp, 2-6 thermal characteristics, 20-2 three-state (definition), 16-35 timebase (tb), 7-6 , 12-11 reference registers, 12-24 timebase control and status register, 12-25 timebase register mapping, 6-16 timebase register, 12-24 timebase counter, 12-2 timer, disabling, 15-35 tlb (definition), 1-2 tlb manipulation, 11-30 loading the reserved tlb entries, 11-32 tlb invalidation, 11-32 tlb reload, 11-30 tlb replacement counter, 11-32 tlbia, 7-8 , 11-32 tlbie, 7-7 , 11-32 tlbsync, 7-8 tms, 2-9 , 19-2 trace interrupt, 7-11 transaction (bus), 13-8 transfer acknowledge (ta), 13-35 transfer error acknowledge (tea), 13-35 transfer error acknowledge generation, 15-7 transfer size (tsiz), 13-32 transfer start (ts), 13-32 transferring software, b-1 transfers alignment and packaging, 13-25 burst-inhibited, 13-16 termination signals, 13-35 translation lookaside buffer operation, 11-2 translation table structure, 11-4 transmissions, clocked, 18-31 transmitter register, 16-4 transmitter, 16-3 trap enable bits, programming, 18-20 trap enable control register, 18-31 trap enable mode support, 18-22 trap enable mode, 18-21 trst, 2-9 trst_b, 19-2 ts, 2-2 , 13-5 tsiz(0-1), 13-4 tsiz0, 2-2 tsiz1, 2-2
index index-14 mpc801 user? manual motorola index u uart, 1-6 , 16-1 baud rate generator, 16-8 block diagram, 16-1 features, 16-2 memory map, 3-1 , a-5 receiver modes, 16-5 serial interface signals, 16-2 sub-block description, 16-3 ucts1, 2-8 ucts2, 2-8 ugpio1, 2-8 ugpio2, 2-8 unlock all, 9-9 unlock line, 9-9 upm cycle, initiation, 15-19 upm start address locations, 15-39 upwaita, 2-6 upwaitb, 2-6 urts1, 2-8 urts2, 2-8 urxd1, 2-8 urxd2, 2-8 user-programmable machine (upm), 15-19 utxd1, 2-8 utxd2, 2-8 v v, 15-6 vco, 5-16 vf pins encoding, 18-4 vf0, 2-7 vf1, 2-7 vf2, 2-7 vfls(0-1), 2-6 vfls, 18-4 visibility, external, 18-1 voltage control oscillator, 5-16 vsync, 18-2 w wait mechanism, 15-36 watchpoint marking, 6-5 watchpoints and breakpoints, 18-8 byte and half-word working mode, 18-12 features, 18-11 ignore first match option, 18-14 instruction support, 18-16 internal, 18-9 load/store support, 18-17 restrictions, 18-12 we(0-3), 2-5 window trace, 18-5 end address, 18-7 start address, 18-6 synchronizing, 18-6 vysync, 18-7 write cycle data bus contents, 13-27 write protect configuration, 15-7 writethrough mode, 10-9 writing to the data cache, 10-8 x xfc, 2-6 xtal, 2-6


▲Up To Search▲   

 
Price & Availability of XP06534

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X